Last active
January 17, 2020 19:53
-
-
Save antongolub/146a8be5c9430d9b0ea58cc05ca497fa to your computer and use it in GitHub Desktop.
Class and object type relations
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
class Foo { | |
foo() { return 'foo' } | |
} | |
const foo: Foo = new Foo() // Foo is used as interface | |
const applyMixins = <T, M>(target: T, mixin: M) => { | |
// typeof target refers to own class type — a function with constuctor signature | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment