3 ms·
Highlights / tl;dr: - ability to check .js files - default type parameters (eg; `class Component<Props, State = object> {}`) - generators/iterators (includin
by rattray 10y ago
Highlights / tl;dr:
- ability to check .js files
- default type parameters (eg; `class Component<Props, State = object> {}`)
- generators/iterators (including async-generators, a stage 3 proposal).
- `--strict` flag to easily give you --strictNullChecks, --noImplicitAny, --noImplicitThis, and --alwaysStrict
- language server plugins are official (the Angular and Vue ones were promoted in particular)
- deleted 10y ago[deleted]
- sheetjs 10y agoI wish TS would consider the annotation-in-comments form from flow: https://flow.org/blog/2015/02/20/Flow-Comments/ https://flow.org/blog/2015/02/20/Flow-Comments/ For switching a large existing JS codebase, it's easy to add flow comments without changing the final minified builds, allowing you to reap the full benefits of the type check.
- mohamedhegazy 10y agoTypeScript allows for JSDoc Comments for types in .js files with `--allowJs`. you do not need to change your code for that. See https://github.com/Microsoft/TypeScript/wiki/JSDoc-support-in-JavaScript https://github.com/Microsoft/TypeScript/wiki/JSDoc-support-i...
- yathern 10y agoThank you! I've been trying to figure out how to get JSDoc-ed code to get appropriately typed in Visual Studio Code with Typescript files as well.