- Notifications
You must be signed in to change notification settings - Fork12.9k
What's new in TypeScript
Because this page hit a limit on a GitHub wiki page size, it's now hosted on the website:https://www.typescriptlang.org/docs/handbook/release-notes/overview.html
SeeImproved UX Around Promises
SeeBetter Unicode Support for Identifiers
Seeimport.meta
Support in SystemJS
Seeget
andset
Accessors Are Allowed in Ambient Contexts
SeeAmbient Classes and Functions Can Merge
SeeAPIs to Support--build
and--incremental
Seeawait
Completions on Promises
SeeImproved excess property checks in union types
SeeThe--allowUmdGlobalAccess
flag
SeeSmarter union type checking
SeeHigher order type inference from generic constructors
SeeFaster subsequent builds with the--incremental
flag
SeeoutFile
SeeHigher order type inference from generic functions
SeeImprovements forReadonlyArray
andreadonly
tuples
SeeA new syntax forReadonlyArray
Seereadonly
mapped type modifiers andreadonly
arrays
SeeCaveats
SeeCaveats
SeeType-checking forglobalThis
SeeImproved behavior for calling union types
SeeCaveats
SeeIncremental file watching for composite projects in--build --watch
SeeCaveats
SeeGeneric spread expressions in object literals
SeeGeneric object rest variables and parameters
SeeBigInt
SeeCaveats
SeeNon-unit types as union discriminants
Seetsconfig.json
inheritance via Node.js packages
SeeObject.defineProperty
declarations in JavaScript
SeeMapped types on tuples and arrays
SeeProperties declarations on functions
SeeVersion selection withtypesVersions
SeeTuples in rest parameters and spread expressions
SeeRest parameters with tuple types
SeeSpread expressions with tuple types
SeeExample
SeeOptional elements in tuple types
SeeExample
SeeRest elements in tuple types
SeeExample
SeeExample
SeeSupport fordefaultProps
in JSX
SeeCaveats
SeeExplicit types ondefaultProps
See/// <reference lib="..." />
reference directives
SeeExample
SeeSupportnumber
andsymbol
named properties withkeyof
and mapped types
SeeExample
SeeExample
SeeGeneric type arguments in JSX elements
SeeExample
SeeGeneric type arguments in generic tagged templates
SeeExample
Seeimport
types
SeeExample
SeeRelaxing declaration emit visiblity rules
SeeExample
SeeExample
SeeExample
SeeDistributive conditional types
SeeExample
SeeExample
SeeExample
SeeType inference in conditional types
SeePredefined conditional types
SeeExample
SeeImproved control over mapped type modifiers
SeeExample
SeeExample
SeeExample
SeeImprovedkeyof
with intersection types
SeeExample
SeeBetter handling for namespace patterns in.js
files
SeeIIFEs as namespace declarations
SeeNested and merged declarations
SeeExample
SeeLocally scoped JSX namespaces
SeeExample
SeeExample
SeeExample
SeeExample
SeeStrict Class Initialization
SeeDefinite Assignment Assertions
SeeImproved type inference for object literals
SeeExample
SeeImproved handling of structurally identical classes andinstanceof
expressions
SeeExample:
SeeType guards inferred fromin
operator
SeeExample
SeeSupport forimport d from "cjs"
form CommonJS modules with--esModuleInterop
SeeExample
SeeExample
SeeCleaner output in--watch
mode
SeeExample
SeeNote:
SeeSupport for JSX Fragment Syntax
SeeCache tagged template objects in modules
SeeExample
SeeLocalized diagnostics on the command line
SeeExample
SeeSuppress errors in .ts files using '// @ts-ignore' comments
SeeExample
SeeWrite-only references now flagged as unused
SeeExample
SeeExample
SeeOptionalcatch
clause variables
SeeType assertion/cast syntax incheckJs
/@ts-check
mode
SeeDeduplicated and redirected packages
SeeThe--preserveSymlinks
compiler flag
SeeString Enums
SeeImproved inference for generics
SeeReturn types as inference targets
SeeType parameter inference from contextual types
SeeStricter checking for generic functions
SeeStrict contravariance for callback parameters
SeeGenerators and Iteration for ES5/ES3
SeeIterators
SeeGenerators
SeeCaveats
SeeExample
SeeErrors in .js files with--checkJs
SeePutting all of the above rules together in an example:
Seeobject
type
SeeExample
SeeBetter checking fornull
/undefined
in operands of expressions
SeeDotted property for types with string index signatures
SeeSupport for spread operator on JSX element children
SeeExample
SeeExample
SeeExample
SeeMapped Types
SeePartial
,Readonly
,Record
, andPick
SeeExample
SeeSupport for external helpers library (tslib
)
SeeExample
SeeSupport for--target ES2016
,--target ES2017
and--target ESNext
SeeExample
SeeExample
SeeBetter inference for literal types
SeeExample
SeeExample
SeeUse returned values from super calls as 'this'
SeeExample
SeeExample
SeeNull- and undefined-aware types
SeeExample
SeeAssigned-before-use checking
SeeExample
SeeOptional parameters and properties
SeeNon-null and non-undefined type guards
SeeExample
SeeDotted names in type guards
SeeExample
SeeNon-null assertion operator
SeeControl flow based type analysis
SeeExample
SeeExample
SeeRead-only properties and index signatures
SeeExample
SeeSpecifying the type ofthis
for functions
Seethis
parameters in callbacks
SeeExample
SeeGlob support intsconfig.json
SeeExample
SeeModule resolution enhancements: BaseUrl, Path mapping, rootDirs and tracing
SeeBase URL
SeeExample
SeePath mapping
SeeExample
SeeVirtual Directories withrootDirs
SeeExample
SeeShorthand ambient module declarations
SeeWildcard character in module names
SeeExample
SeeExample
SeeSupport for UMD module definitions
SeeExample
SeePrivate and Protected Constructors
SeeExample
SeeAbstract properties and accessors
SeeExample
SeeIncluding built-in type declarations with--lib
SeeExample
SeeFlag unused declarations with--noUnusedParameters
and--noUnusedLocals
SeeExample
SeeModule identifiers allow for.js
extension
SeeSupport 'target : es5' with 'module: es6'
SeeTrailing commas in function parameter and argument lists
SeeExample
SeeAllow duplicate identifiers across declarations
SeeExample
SeeType parameters as constraints
SeeExample
SeeControl flow analysis errors
SeeExample
SeeExample
SeeExample
SeeExample
SeeStateless Function Components in React
SeeSimplifiedprops
type management in React
SeeAugmenting global/module scope from modules
SeeExample
SeeExample
SeeImproved union/intersection type inference
SeeExample
SeeConcatenateAMD
andSystem
modules with--outFile
SeeExample
SeeSupport fordefault
import interop with SystemJS
SeeAllow capturedlet
/const
in loops
SeeExample
SeeImproved checking forfor..in
statements
SeeExample
SeeModules are now emitted with a"use strict";
prologue
SeeIncluding.js
files with--allowJs
SeeCustom JSX factories using--reactNamespace
SeeExample
SeeExample
SeeOfficial TypeScript NuGet package
SeePrettier error messages fromtsc
SeeColorization of JSX code in VS 2015
SeeThe--project
(-p
) flag can now take any file path
SeeAllow comments in tsconfig.json
SeeSupport output to IPC-driven files
SeeImproved support fortsconfig.json
in Visual Studio 2015
Seeasync
/await
support in ES6 targets (Node v4+)
SeeExample
SeeSupport for--target ES6
with--module
SeeExample
Seethis
-typing
SeeES7 exponentiation operator
SeeExample
SeeImproved checking for destructuring object literal
SeeExample
SeeSupport for decorators when targeting ES3
SeeJSX support
SeeNew.tsx
file extension andas
operator
SeeUsing React
SeeExample
Seeabstract
classes and methods
SeeExamples
SeeStricter object literal assignment checks
SeeExamples
SeeExperimental support forasync
functions
SeeExample
SeeAdjustments in module resolution logic
SeeMerging ambient class and interface declaration
SeeUser-defined type guard functions
SeeExamples
Seeexclude
property support in tsconfig.json
SeeRe-exporting
SeeBare Import
SeeDestructuring in declarations and assignments
SeeDeclarations
SeeAssignments
SeeConst
SeeBlock scoped
SeeExample
SeeDecorators
SeeExample
SeeSupport forUMD
andSystem
module output
SeeUnicode codepoint escapes in strings
SeeTagged template strings in ES3/ES5
SeeAMD-dependency optional names
SeeProject support throughtsconfig.json
SeeExample
See--rootDir
command line option
See--noEmitHelpers
command line option
See--newLine
command line option
See--inlineSourceMap
andinlineSources
command line options
SeeUnion types
SeeOverview
SeeType Guards
SeeType Aliases
Seeconst enum
(completely inlined enums)
See-noEmitOnError
commandline option
SeeProtected
SeeTuple types
News
Debugging TypeScript
- Performance
- Performance-Tracing
- Debugging-Language-Service-in-VS-Code
- Getting-logs-from-TS-Server-in-VS-Code
- JavaScript-Language-Service-in-Visual-Studio
- Providing-Visual-Studio-Repro-Steps
Contributing to TypeScript
- Contributing to TypeScript
- TypeScript Design Goals
- Coding Guidelines
- Useful Links for TypeScript Issue Management
- Writing Good Design Proposals
- Compiler Repo Notes
- Deployment
Building Tools for TypeScript
- Architectural Overview
- Using the Compiler API
- Using the Language Service API
- Standalone Server (tsserver)
- TypeScript MSBuild In Depth
- Debugging Language Service in VS Code
- Writing a Language Service Plugin
- Docker Quickstart
FAQs
The Main Repo