Created
April 3, 2021 16:58
-
-
Save bakerface/0da3f4c33fcfbe02ea585a4a33390134 to your computer and use it in GitHub Desktop.
TypeScript Mixin
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
export type Constructor<T> = new (...args: any[]) => T; | |
export interface Mixin<Features, Requirements = any> { | |
<T extends Constructor<Requirements>>(Base: T): T & Constructor<Features>; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment