Skip to content

Instantly share code, notes, and snippets.

@starbeast
Last active June 5, 2017 17:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save starbeast/6d5d647c9f597f8a4afb4ae8bf82ca34 to your computer and use it in GitHub Desktop.
Save starbeast/6d5d647c9f597f8a4afb4ae8bf82ca34 to your computer and use it in GitHub Desktop.
Decorated mixin
@MixinInjectable(Dependency, AnotherDependency, Inject(YetAnotherDependency))
class Mixin extends Base {
dependency: Dependency;
anotherDependency: AnotherDependency;
yetAnotherDependency: IYetAnotherDependency;
constructor(...args: any[]) {
super(...args.slice(3));
this.dependency = args[0];
this.anotherDependency = args[1];
this.yetAnotherDependency = args[2];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment