Could we have TypeScript with no build step? Could we have types in JavaScript? Maybe! We're exploring bringing optional type syntax into the JavaScript language! devblogs.microsoft.com/typescript/a-p…
The Types as Comments proposal means that browsers could run TypeScript-checked code directly, (even though they wouldn't do any type-checking). That means faster iteration with all the type-checking and editing experience you know and love today.
We're excited to hear what you think of this idea! We're hoping that this proposal can make coding easier for TypeScript and JavaScript users at every scale.
@typescript Typescript can already run ES modules directly, with inline type checking in VSCode or CLI type checking using TSC When the types are defined using JSDoc This change to the ECMA262 spec is a regression from existing functionality
@typescript This comment clarified it more, because type-checking in browser wouldn't make it better, in fact it would move the error from compile to runtime and also slow down. But just being able to run and ignore the types - yes, that has benefits for development