Skip to Content
Docs开发前端开发TypeScriptTypescript Changelog

Typescript Changelog

5.1 

  1. 返回函数可以隐式返回了
// ✅ Works in TypeScript 5.1! function f4(): undefined { // no returns }
  1. get、set 可以是不同类型的值了
interface CSSStyleRule { /** Always reads as a `CSSStyleDeclaration` */ get style(): CSSStyleDeclaration; /** Can only write a `string` here. */ set style(newValue: string); }

5.0 

Last updated on