xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

TypeScript 4.0 New Features

$ npm install typescript@beta

https://devblogs.microsoft.com/typescript/announcing-typescript-4-0-beta/

Variadic Tuple Types

可变参数元组类型



Labeled Tuple Elements

标记的元组元素



Class Property Inference from Constructors

构造函数的类属性推断



Short-Circuiting Assignment Operators

短路赋值运算符

let values: string[];

// Before
(values ?? (values = [])).push("hello");

// After
(values ??= []).push("hello");

a ||= b;

// actually equivalent to

a || (a = b);

unknown on catch Clause Bindings

捕获子句绑定未知



Custom JSX Factories

自定义 JSX 工厂



Speed Improvements in build mode with --noEmitOnError

改善了 --noEmitOnError 构建模式下的速度



--incremental with --noEmit

--incremental 和 --noEmit



Editor Improvements

编辑器改进

/** @deprecated */ Support

Partial Editing Mode at Startup
启动时的部分编辑模式

Smarter Auto-Imports
更智能的自动导入


Breaking Changes

重大变化

lib.d.ts Changes
lib.d.ts 的变化

Properties Overridding Accessors (and vice versa) is an Error
属性覆盖访问器(反之亦然)是错误

Operands for delete must be optional
删除操作数必须是可选的

Usage of TypeScript’s Node Factory is Deprecated
使用 TypeScript 的 Node Factory 已弃用







refs

https://www.typescriptlang.org/zh/

https://www.typescriptlang.org/play

the new typescript website

https://devblogs.microsoft.com/typescript/announcing-the-new-typescript-website/

Fluent Design

https://www.microsoft.com/design/fluent/


Flag Counter

©xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


原文地址:https://www.cnblogs.com/xgqfrms/p/13500959.html