Last active
July 30, 2019 14:51
-
-
Save julianwachholz/00921dd613a29ae4b68860f52437a816 to your computer and use it in GitHub Desktop.
typescript constructor properties
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 abstract class BaseStore<T> { | |
@observable | |
objects: T[] = []; | |
constructor(private dao: BaseDAO<T>) {} | |
} |
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 class TenantStore extends BaseStore<ITenant> { | |
constructor(dao: BaseDAO<ITenant>) { | |
super(dao); | |
this.load(); | |
} | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment