Created
July 14, 2021 17:19
-
-
Save captain-yossarian/881d8f169fc9b0552461f7a35a8173af to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Base { } | |
function fn<T extends typeof Base>( | |
Cls: T, | |
prop: keyof InstanceType<T>, | |
) { | |
return (new Cls())[prop]; // error | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment