Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

What's new in TypeScript

Orta edited this pageOct 10, 2019 ·245 revisions

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

TypeScript 3.6

SeeTypeScript 3.6

Stricter Generators

SeeStricter Generators

More Accurate Array Spread

SeeMore Accurate Array Spread

Improved UX Around Promises

SeeImproved UX Around Promises

Better Unicode Support for Identifiers

SeeBetter Unicode Support for Identifiers

import.meta Support in SystemJS

Seeimport.meta Support in SystemJS

get andset Accessors Are Allowed in Ambient Contexts

Seeget andset Accessors Are Allowed in Ambient Contexts

Ambient Classes and Functions Can Merge

SeeAmbient Classes and Functions Can Merge

APIs to Support--build and--incremental

SeeAPIs to Support--build and--incremental

Semicolon-Aware Code Edits

SeeSemicolon-Aware Code Edits

Smarter Auto-Import Syntax

SeeSmarter Auto-Import Syntax

await Completions on Promises

Seeawait Completions on Promises

New TypeScript Playground

SeeNew TypeScript Playground

TypeScript 3.5

SeeTypeScript 3.5

Speed improvements

SeeSpeed improvements

Type-checking speed-ups

SeeType-checking speed-ups

--incremental improvements

See--incremental improvements

TheOmit helper type

SeeTheOmit helper type

Improved excess property checks in union types

SeeImproved excess property checks in union types

The--allowUmdGlobalAccess flag

SeeThe--allowUmdGlobalAccess flag

Smarter union type checking

SeeSmarter union type checking

Higher order type inference from generic constructors

SeeHigher order type inference from generic constructors

TypeScript 3.4

SeeTypeScript 3.4

Faster subsequent builds with the--incremental flag

SeeFaster subsequent builds with the--incremental flag

Composite projects

SeeComposite projects

outFile

SeeoutFile

Higher order type inference from generic functions

SeeHigher order type inference from generic functions

Improvements forReadonlyArray andreadonly tuples

SeeImprovements forReadonlyArray andreadonly tuples

A new syntax forReadonlyArray

SeeA new syntax forReadonlyArray

readonly tuples

Seereadonly tuples

readonly mapped type modifiers andreadonly arrays

Seereadonly mapped type modifiers andreadonly arrays

Caveats

SeeCaveats

const assertions

Seeconst assertions

Caveats

SeeCaveats

Type-checking forglobalThis

SeeType-checking forglobalThis

TypeScript 3.3

SeeTypeScript 3.3

Improved behavior for calling union types

SeeImproved behavior for calling union types

Caveats

SeeCaveats

Incremental file watching for composite projects in--build --watch

SeeIncremental file watching for composite projects in--build --watch

TypeScript 3.2

SeeTypeScript 3.2

strictBindCallApply

SeestrictBindCallApply

Caveats

SeeCaveats

Generic spread expressions in object literals

SeeGeneric spread expressions in object literals

Generic object rest variables and parameters

SeeGeneric object rest variables and parameters

BigInt

SeeBigInt

Caveats

SeeCaveats

Non-unit types as union discriminants

SeeNon-unit types as union discriminants

tsconfig.json inheritance via Node.js packages

Seetsconfig.json inheritance via Node.js packages

The new--showConfig flag

SeeThe new--showConfig flag

Object.defineProperty declarations in JavaScript

SeeObject.defineProperty declarations in JavaScript

TypeScript 3.1

SeeTypeScript 3.1

Mapped types on tuples and arrays

SeeMapped types on tuples and arrays

Properties declarations on functions

SeeProperties declarations on functions

Version selection withtypesVersions

SeeVersion selection withtypesVersions

Matching behavior

SeeMatching behavior

Multiple fields

SeeMultiple fields

TypeScript 3.0

SeeTypeScript 3.0

Tuples in rest parameters and spread expressions

SeeTuples in rest parameters and spread expressions

Rest parameters with tuple types

SeeRest parameters with tuple types

Spread expressions with tuple types

SeeSpread expressions with tuple types

Generic rest parameters

SeeGeneric rest parameters

Example

SeeExample

Optional elements in tuple types

SeeOptional elements in tuple types

Example

SeeExample

Rest elements in tuple types

SeeRest elements in tuple types

Example

SeeExample

Newunknown top type

SeeNewunknown top type

Example

SeeExample

Support fordefaultProps in JSX

SeeSupport fordefaultProps in JSX

Caveats

SeeCaveats

Explicit types ondefaultProps

SeeExplicit types ondefaultProps

Changes to@types/React

SeeChanges to@types/React

/// <reference lib="..." /> reference directives

See/// <reference lib="..." /> reference directives

Example

SeeExample

TypeScript 2.9

SeeTypeScript 2.9

Supportnumber andsymbol named properties withkeyof and mapped types

SeeSupportnumber andsymbol named properties withkeyof and mapped types

Example

SeeExample

Example

SeeExample

Recommendations

SeeRecommendations

Generic type arguments in JSX elements

SeeGeneric type arguments in JSX elements

Example

SeeExample

Generic type arguments in generic tagged templates

SeeGeneric type arguments in generic tagged templates

Example

SeeExample

import types

Seeimport types

Example

SeeExample

Relaxing declaration emit visiblity rules

SeeRelaxing declaration emit visiblity rules

Support forimport.meta

SeeSupport forimport.meta

Example

SeeExample

New--resolveJsonModule

SeeNew--resolveJsonModule

Example

SeeExample

--pretty output by default

See--pretty output by default

New--declarationMap

SeeNew--declarationMap

TypeScript 2.8

SeeTypeScript 2.8

Conditional Types

SeeConditional Types

Example

SeeExample

Distributive conditional types

SeeDistributive conditional types

Example

SeeExample

Example

SeeExample

Example

SeeExample

Type inference in conditional types

SeeType inference in conditional types

Predefined conditional types

SeePredefined conditional types

Example

SeeExample

Improved control over mapped type modifiers

SeeImproved control over mapped type modifiers

Example

SeeExample

Example

SeeExample

Example

SeeExample

Improvedkeyof with intersection types

SeeImprovedkeyof with intersection types

Example

SeeExample

Better handling for namespace patterns in.js files

SeeBetter handling for namespace patterns in.js files

IIFEs as namespace declarations

SeeIIFEs as namespace declarations

Defaulted declarations

SeeDefaulted declarations

Prototype assignment

SeePrototype assignment

Nested and merged declarations

SeeNested and merged declarations

Per-file JSX factories

SeePer-file JSX factories

Example

SeeExample

Locally scoped JSX namespaces

SeeLocally scoped JSX namespaces

New--emitDeclarationsOnly

SeeNew--emitDeclarationsOnly

TypeScript 2.7

SeeTypeScript 2.7

Constant-named properties

SeeConstant-named properties

Example

SeeExample

Example

SeeExample

unique symbol

Seeunique symbol

Example

SeeExample

Example

SeeExample

Strict Class Initialization

SeeStrict Class Initialization

Definite Assignment Assertions

SeeDefinite Assignment Assertions

Fixed Length Tuples

SeeFixed Length Tuples

Improved type inference for object literals

SeeImproved type inference for object literals

Example

SeeExample

Improved handling of structurally identical classes andinstanceof expressions

SeeImproved handling of structurally identical classes andinstanceof expressions

Example:

SeeExample:

Type guards inferred fromin operator

SeeType guards inferred fromin operator

Example

SeeExample

Support forimport d from "cjs" form CommonJS modules with--esModuleInterop

SeeSupport forimport d from "cjs" form CommonJS modules with--esModuleInterop

Example

SeeExample

Numeric separators

SeeNumeric separators

Example

SeeExample

Cleaner output in--watch mode

SeeCleaner output in--watch mode

Prettier--pretty output

SeePrettier--pretty output

TypeScript 2.6

SeeTypeScript 2.6

Strict function types

SeeStrict function types

Example

SeeExample

Note:

SeeNote:

Support for JSX Fragment Syntax

SeeSupport for JSX Fragment Syntax

Cache tagged template objects in modules

SeeCache tagged template objects in modules

Example

SeeExample

Localized diagnostics on the command line

SeeLocalized diagnostics on the command line

Example

SeeExample

Suppress errors in .ts files using '// @ts-ignore' comments

SeeSuppress errors in .ts files using '// @ts-ignore' comments

Example

SeeExample

Fastertsc --watch

SeeFastertsc --watch

Write-only references now flagged as unused

SeeWrite-only references now flagged as unused

Example

SeeExample

Example

SeeExample

TypeScript 2.5

SeeTypeScript 2.5

Optionalcatch clause variables

SeeOptionalcatch clause variables

Type assertion/cast syntax incheckJs/@ts-check mode

SeeType assertion/cast syntax incheckJs/@ts-check mode

Deduplicated and redirected packages

SeeDeduplicated and redirected packages

The--preserveSymlinks compiler flag

SeeThe--preserveSymlinks compiler flag

TypeScript 2.4

SeeTypeScript 2.4

Dynamic Import Expressions

SeeDynamic Import Expressions

String Enums

SeeString Enums

Improved inference for generics

SeeImproved inference for generics

Return types as inference targets

SeeReturn types as inference targets

Type parameter inference from contextual types

SeeType parameter inference from contextual types

Stricter checking for generic functions

SeeStricter checking for generic functions

Strict contravariance for callback parameters

SeeStrict contravariance for callback parameters

Weak Type Detection

SeeWeak Type Detection

TypeScript 2.3

SeeTypeScript 2.3

Generators and Iteration for ES5/ES3

SeeGenerators and Iteration for ES5/ES3

Iterators

SeeIterators

Generators

SeeGenerators

New--downlevelIteration

SeeNew--downlevelIteration

Async Iteration

SeeAsync Iteration

Async iterators

SeeAsync iterators

Async Generators

SeeAsync Generators

Thefor-await-of Statement

SeeThefor-await-of Statement

Caveats

SeeCaveats

Generic parameter defaults

SeeGeneric parameter defaults

Example

SeeExample

New--strict master option

SeeNew--strict master option

Enhanced--init output

SeeEnhanced--init output

Errors in .js files with--checkJs

SeeErrors in .js files with--checkJs

TypeScript 2.2

SeeTypeScript 2.2

Support for Mix-in classes

SeeSupport for Mix-in classes

First some terminology:

SeeFirst some terminology:

Putting all of the above rules together in an example:

SeePutting all of the above rules together in an example:

object type

Seeobject type

Support fornew.target

SeeSupport fornew.target

Example

SeeExample

Better checking fornull/undefined in operands of expressions

SeeBetter checking fornull/undefined in operands of expressions

Dotted property for types with string index signatures

SeeDotted property for types with string index signatures

Support for spread operator on JSX element children

SeeSupport for spread operator on JSX element children

Example

SeeExample

Newjsx: react-native

SeeNewjsx: react-native

TypeScript 2.1

SeeTypeScript 2.1

keyof and Lookup Types

Seekeyof and Lookup Types

Example

SeeExample

Example

SeeExample

Mapped Types

SeeMapped Types

Partial,Readonly,Record, andPick

SeePartial,Readonly,Record, andPick

Object Spread and Rest

SeeObject Spread and Rest

Downlevel Async Functions

SeeDownlevel Async Functions

Example

SeeExample

tsconfig.json

Seetsconfig.json

dramaticWelcome.ts

SeedramaticWelcome.ts

Support for external helpers library (tslib)

SeeSupport for external helpers library (tslib)

Untyped imports

SeeUntyped imports

Example

SeeExample

Support for--target ES2016,--target ES2017 and--target ESNext

SeeSupport for--target ES2016,--target ES2017 and--target ESNext

Improvedany Inference

SeeImprovedany Inference

Example

SeeExample

Implicit any errors

SeeImplicit any errors

Example

SeeExample

Better inference for literal types

SeeBetter inference for literal types

Example

SeeExample

Example

SeeExample

Use returned values from super calls as 'this'

SeeUse returned values from super calls as 'this'

Example

SeeExample

Configuration inheritance

SeeConfiguration inheritance

Example

SeeExample

New--alwaysStrict

SeeNew--alwaysStrict

TypeScript 2.0

SeeTypeScript 2.0

Null- and undefined-aware types

SeeNull- and undefined-aware types

--strictNullChecks

See--strictNullChecks

Example

SeeExample

Assigned-before-use checking

SeeAssigned-before-use checking

Example

SeeExample

Optional parameters and properties

SeeOptional parameters and properties

Non-null and non-undefined type guards

SeeNon-null and non-undefined type guards

Example

SeeExample

Dotted names in type guards

SeeDotted names in type guards

Example

SeeExample

Expression operators

SeeExpression operators

Type widening

SeeType widening

Non-null assertion operator

SeeNon-null assertion operator

Compatibility

SeeCompatibility

Control flow based type analysis

SeeControl flow based type analysis

Example

SeeExample

Tagged union types

SeeTagged union types

Example

SeeExample

Thenever type

SeeThenever type

Read-only properties and index signatures

SeeRead-only properties and index signatures

Example

SeeExample

Specifying the type ofthis for functions

SeeSpecifying the type ofthis for functions

this parameters in callbacks

Seethis parameters in callbacks

Example

SeeExample

--noImplicitThis

See--noImplicitThis

Glob support intsconfig.json

SeeGlob support intsconfig.json

Example

SeeExample

Module resolution enhancements: BaseUrl, Path mapping, rootDirs and tracing

SeeModule resolution enhancements: BaseUrl, Path mapping, rootDirs and tracing

Base URL

SeeBase URL

Example

SeeExample

Path mapping

SeePath mapping

Example

SeeExample

Virtual Directories withrootDirs

SeeVirtual Directories withrootDirs

Example

SeeExample

Tracing module resolution

SeeTracing module resolution

Shorthand ambient module declarations

SeeShorthand ambient module declarations

declarations.d.ts

Seedeclarations.d.ts

Wildcard character in module names

SeeWildcard character in module names

Example

SeeExample

Example

SeeExample

Support for UMD module definitions

SeeSupport for UMD module definitions

math-lib.d.ts

Seemath-lib.d.ts

Optional class properties

SeeOptional class properties

Example

SeeExample

Private and Protected Constructors

SeePrivate and Protected Constructors

Example

SeeExample

Abstract properties and accessors

SeeAbstract properties and accessors

Example

SeeExample

Implicit index signatures

SeeImplicit index signatures

Including built-in type declarations with--lib

SeeIncluding built-in type declarations with--lib

Example

SeeExample

Flag unused declarations with--noUnusedParameters and--noUnusedLocals

SeeFlag unused declarations with--noUnusedParameters and--noUnusedLocals

Example

SeeExample

Module identifiers allow for.js extension

SeeModule identifiers allow for.js extension

Support 'target : es5' with 'module: es6'

SeeSupport 'target : es5' with 'module: es6'

Trailing commas in function parameter and argument lists

SeeTrailing commas in function parameter and argument lists

Example

SeeExample

New--skipLibCheck

SeeNew--skipLibCheck

Allow duplicate identifiers across declarations

SeeAllow duplicate identifiers across declarations

Example

SeeExample

New--declarationDir

SeeNew--declarationDir

TypeScript 1.8

SeeTypeScript 1.8

Type parameters as constraints

SeeType parameters as constraints

Example

SeeExample

Control flow analysis errors

SeeControl flow analysis errors

Unreachable code

SeeUnreachable code

Example

SeeExample

Unused labels

SeeUnused labels

Example

SeeExample

Implicit returns

SeeImplicit returns

Example

SeeExample

Case clause fall-throughs

SeeCase clause fall-throughs

Example

SeeExample

Stateless Function Components in React

SeeStateless Function Components in React

Simplifiedprops type management in React

SeeSimplifiedprops type management in React

Augmenting global/module scope from modules

SeeAugmenting global/module scope from modules

Example

SeeExample

Example

SeeExample

String literal types

SeeString literal types

Improved union/intersection type inference

SeeImproved union/intersection type inference

Example

SeeExample

ConcatenateAMD andSystem modules with--outFile

SeeConcatenateAMD andSystem modules with--outFile

Example

SeeExample

Support fordefault import interop with SystemJS

SeeSupport fordefault import interop with SystemJS

Allow capturedlet/const in loops

SeeAllow capturedlet/const in loops

Example

SeeExample

Improved checking forfor..in statements

SeeImproved checking forfor..in statements

Example

SeeExample

Modules are now emitted with a"use strict"; prologue

SeeModules are now emitted with a"use strict"; prologue

Including.js files with--allowJs

SeeIncluding.js files with--allowJs

Custom JSX factories using--reactNamespace

SeeCustom JSX factories using--reactNamespace

Example

SeeExample

this-based type guards

Seethis-based type guards

Example

SeeExample

Official TypeScript NuGet package

SeeOfficial TypeScript NuGet package

Prettier error messages fromtsc

SeePrettier error messages fromtsc

Colorization of JSX code in VS 2015

SeeColorization of JSX code in VS 2015

The--project (-p) flag can now take any file path

SeeThe--project (-p) flag can now take any file path

Allow comments in tsconfig.json

SeeAllow comments in tsconfig.json

Support output to IPC-driven files

SeeSupport output to IPC-driven files

Improved support fortsconfig.json in Visual Studio 2015

SeeImproved support fortsconfig.json in Visual Studio 2015

A couple of limitations:

SeeA couple of limitations:

TypeScript 1.7

SeeTypeScript 1.7

async/await support in ES6 targets (Node v4+)

Seeasync/await support in ES6 targets (Node v4+)

Example

SeeExample

Support for--target ES6 with--module

SeeSupport for--target ES6 with--module

Example

SeeExample

this-typing

Seethis-typing

ES7 exponentiation operator

SeeES7 exponentiation operator

Example

SeeExample

Improved checking for destructuring object literal

SeeImproved checking for destructuring object literal

Example

SeeExample

Support for decorators when targeting ES3

SeeSupport for decorators when targeting ES3

TypeScript 1.6

SeeTypeScript 1.6

JSX support

SeeJSX support

New.tsx file extension andas operator

SeeNew.tsx file extension andas operator

Using React

SeeUsing React

Using other JSX frameworks

SeeUsing other JSX frameworks

Output generation

SeeOutput generation

Intersection types

SeeIntersection types

Example

SeeExample

Local type declarations

SeeLocal type declarations

Class expressions

SeeClass expressions

Extending expressions

SeeExtending expressions

abstract classes and methods

Seeabstract classes and methods

Examples

SeeExamples

Generic type aliases

SeeGeneric type aliases

Stricter object literal assignment checks

SeeStricter object literal assignment checks

Examples

SeeExamples

ES6 generators

SeeES6 generators

Experimental support forasync functions

SeeExperimental support forasync functions

Example

SeeExample

Nightly builds

SeeNightly builds

Adjustments in module resolution logic

SeeAdjustments in module resolution logic

Merging ambient class and interface declaration

SeeMerging ambient class and interface declaration

User-defined type guard functions

SeeUser-defined type guard functions

Examples

SeeExamples

exclude property support in tsconfig.json

Seeexclude property support in tsconfig.json

--init command line option

See--init command line option

TypeScript 1.5

SeeTypeScript 1.5

ES6 Modules

SeeES6 Modules ##

Export Declarations

SeeExport Declarations

Re-exporting

SeeRe-exporting

Default Export

SeeDefault Export

Bare Import

SeeBare Import

Destructuring in declarations and assignments

SeeDestructuring in declarations and assignments

Declarations

SeeDeclarations

Assignments

SeeAssignments

namespace keyword

Seenamespace keyword

let andconst support

Seelet andconst support

Const

SeeConst

Block scoped

SeeBlock scoped

for..of support

Seefor..of support

Example

SeeExample

Decorators

SeeDecorators

Example

SeeExample

Computed properties

SeeComputed properties

Support forUMD andSystem module output

SeeSupport forUMD andSystem module output

Unicode codepoint escapes in strings

SeeUnicode codepoint escapes in strings

Tagged template strings in ES3/ES5

SeeTagged template strings in ES3/ES5

AMD-dependency optional names

SeeAMD-dependency optional names

Project support throughtsconfig.json

SeeProject support throughtsconfig.json

Example

SeeExample

--rootDir command line option

See--rootDir command line option

--noEmitHelpers command line option

See--noEmitHelpers command line option

--newLine command line option

See--newLine command line option

--inlineSourceMap andinlineSources command line options

See--inlineSourceMap andinlineSources command line options

TypeScript 1.4

SeeTypeScript 1.4

Union types

SeeUnion types

Overview

SeeOverview

Stricter Generics

SeeStricter Generics

Better Type Inference

SeeBetter Type Inference

let declarations

Seelet declarations

const declarations

Seeconst declarations

Template strings

SeeTemplate strings

Type Guards

SeeType Guards

Type Aliases

SeeType Aliases

const enum (completely inlined enums)

Seeconst enum (completely inlined enums)

-noEmitOnError commandline option

See-noEmitOnError commandline option

AMD Module names

SeeAMD Module names

TypeScript 1.3

SeeTypeScript 1.3

Protected

SeeProtected

Tuple types

SeeTuple types

TypeScript 1.1

SeeTypeScript 1.1

Performance Improvements

SeePerformance Improvements

Better Module Visibility Rules

SeeBetter Module Visibility Rules

Want to contribute to this Wiki?

Fork it and send a pull request.

News

Debugging TypeScript

Contributing to TypeScript

Building Tools for TypeScript

FAQs

The Main Repo

Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp