TypeScript 2.6 只写引用未使用 环境上下文中的导出赋值中禁止使用任意表达式 TypeScript 2.6 完整的破坏性改动列表请到这里查看:breaking change issues . 只写引用未使用 以下代码用于没有编译错误: function f ( n : number ) { n = 0...
TypeScript 2.3 空的泛型列表会被标记为错误 TypeScript 2.3 完整的破坏性改动列表请到这里查看:breaking change issues . 空的泛型列表会被标记为错误 示例 class X <> {} // Error: Type parameter list cannot be empty. ...
async/await support in ES6 targets (Node v4+) Example Support for —target ES6 with —module Example this-typing ES7 exponentiation operator Example Improved checking for dest...
Type parameters as constraints Example Control flow analysis errors Unreachable code Example Unused labels Example Implicit returns Example Case clause fall-throughs Examp...
Strict function types Example Note Cache tagged template objects in modules Example Localized diagnostics on the command line Example Suppress errors in .ts files using ‘// ...
Conditional Types Example Distributive conditional types Example Example Example Type inference in conditional types Predefined conditional types Example Improved control ...
Improved behavior for calling union types Caveats Incremental file watching for composite projects in —build —watch Improved behavior for calling union types In prior version...