Introduce two new syntax for type declaration based on JSDoc
varmyString: !string='hello world';//non-nullablevarmyString1: ?string='hello world';// nullable varmyString2: string='hello world';// nullable varmyString3='hello world';// nullable
by default type are nullable.
Two new compiler flag :
inferNonNullableType make the compiler infer non-nullable type :
varmyString3='hello world'// typeof myString is '!string', non-nullable
nonNullableTypeByDefault (I guess there might be a better name) :
varmyString: !string='hello world';// non-nullablevarmyString1: string='hello world';// non-nullable varmyString2: ?string='hello world';// nullable varmyString3='hello world'// non-nullable
Introduce two new syntax for type declaration based on JSDoc
by default type are nullable.
Two new compiler flag :
inferNonNullableTypemake the compiler infer non-nullable type :nonNullableTypeByDefault(I guess there might be a better name) :