You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When writing ts, sometimes the type must be given, such as lambda. If you don’t want to write it, you must also give it: any. One is fine, but if there are many, the mental burden is very heavy
I want any to be the default type. If the function parameter type, function return value type, and variable type are not specified, the default type will be automatically deduced to any instead of reporting an error.
For asynchronous functions, the return value is allowed to be declared as a basic type and automatically inferred as a Promise, and defaults are also allowed.
The main purpose is to natively support js syntax in ts. Make ts an add-on rather than a coercion
----- Other suggestions ------
The second problem is that the official documentation of typescript is best to set all the type gymnastics as advanced tutorials and the basic type system as basic tutorials. For most scenarios, we only need type inference of ts, and do not need so many type gymnastics. Moreover, some type gymnastics can be realized through some basic type combinations. this will be complicated
✅ Viability Checklist
This wouldn't be a breaking change in existing TypeScript/JavaScript code
This wouldn't change the runtime behavior of existing JavaScript code
This could be implemented without emitting different JS based on the types of the expressions
This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
🔍 Search Terms
When writing ts, sometimes the type must be given, such as lambda. If you don’t want to write it, you must also give it: any. One is fine, but if there are many, the mental burden is very heavy
I want any to be the default type. If the function parameter type, function return value type, and variable type are not specified, the default type will be automatically deduced to any instead of reporting an error.
For asynchronous functions, the return value is allowed to be declared as a basic type and automatically inferred as a Promise, and defaults are also allowed.
The main purpose is to natively support js syntax in ts. Make ts an add-on rather than a coercion
----- Other suggestions ------
The second problem is that the official documentation of typescript is best to set all the type gymnastics as advanced tutorials and the basic type system as basic tutorials. For most scenarios, we only need type inference of ts, and do not need so many type gymnastics. Moreover, some type gymnastics can be realized through some basic type combinations. this will be complicated
✅ Viability Checklist
⭐ Suggestion
无
📃 Motivating Example
无
💻 Use Cases
The text was updated successfully, but these errors were encountered: