TypeScript-Handbook
TypeScript-Handbook copied to clipboard
Update Mixins page
Also from version 2.7 with --strictPropertyInitialization option enabled mixed properties require definite assignment assertion modifiers to be used:
class SmartObject implements Disposable, Activatable {
constructor() {
setInterval(() => console.log(this.isActive + " : " + this.isDisposed), 500);
}
interact() {
this.activate();
}
// Disposable
isDisposed: boolean = false;
dispose!: () => void;
// Activatable
isActive: boolean = false;
activate!: () => void;
deactivate!: () => void;
}
There is also some information on this here that could be used to update this section.