Last active
March 2, 2020 22:49
-
-
Save tjjfvi/93613c050763a48f284d8d0c31f7eeac to your computer and use it in GitHub Desktop.
Create a callable class in Flow
This file contains 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
const _Name = { Name: class <T> { | |
val: T; | |
constructor(val: T){ | |
this.val = val; | |
} | |
} }.Name; | |
const Name = (() => { | |
declare class Name<T> extends _Name<T> { | |
(): T | |
} | |
return ((_Name: any): typeof Name); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment