init methodabstract classes<any>undefined but that's impactful and weirdx!: number; x: number!; (what would x: number!|string; mean?)x: number = *;! modifier on a declaration that says "Let me treat this as non-null when convenient"interface X { foo?(): void; }this types for accessorsinstanceofinstanceof (small + easy), or add nominal types back in some form (huge, been discussed before at length)instanceofx instanceof T instead of x is T in the predicate formis T is like instanceof T when T is a class type馃憤 Thanks for writing these up - I'm sure they're an organizational help for the TS team, but they also are great for external TS users (like me) interested in where TS is going and the learning about the challenges in creating a language like TS.
Some syntax for declaring that an initialization happens 'somewhere'
x!: number;
x: number!; (what would x: number!|string; mean?)
x: number = *;
Ambient decorator a.k.a. attribute (which we don't have yet...)
Maybe just declare a method as an initializer?
class A {
a: number;
init onMount() {
a = 1;
}
}
Extensive argument about nominal vs structural classes
FWIW flowlang has nominal classes. Everything else is structural :rose:
Most helpful comment
馃憤 Thanks for writing these up - I'm sure they're an organizational help for the TS team, but they also are great for external TS users (like me) interested in where TS is going and the learning about the challenges in creating a language like TS.