From 31fff55ca605dfed612f81066563484da7bcba2a Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Fri, 8 Jul 2016 14:53:08 -0700 Subject: [PATCH 01/45] Add link to templates directory --- pages/declaration files/Introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/declaration files/Introduction.md b/pages/declaration files/Introduction.md index de3cc423d..ba31286ac 100644 --- a/pages/declaration files/Introduction.md +++ b/pages/declaration files/Introduction.md @@ -36,7 +36,7 @@ For seasoned authors interested in the underlying mechanics of how declaration f ## `/templates` -In the `templates` directory, you'll find a number of declaration files that serve as a useful starting point +In the [`templates`](https://github.com/Microsoft/TypeScript-Handbook/tree/master/pages/declaration%20files/templates) directory, you'll find a number of declaration files that serve as a useful starting point when writing a new file. Refer to the documentation in [Library Structures](./Library Structures.md) to figure out which template file to use. From e8bcd2e8d8d29a27556ffe34ec35065b503a24b2 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Fri, 8 Jul 2016 14:54:47 -0700 Subject: [PATCH 02/45] Make link to templates absolute --- pages/declaration files/Library Structures.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pages/declaration files/Library Structures.md b/pages/declaration files/Library Structures.md index 414e97fa5..9b75bb5da 100644 --- a/pages/declaration files/Library Structures.md +++ b/pages/declaration files/Library Structures.md @@ -4,7 +4,7 @@ Broadly speaking, the way you *structure* your declaration file depends on how t There are many ways of offering a library for consumption in JavaScript, and you'll need to write your declaration file to match it. This guide covers how to identify common library patterns, and how to write declaration files which correspond to that pattern. -Each type of major library structuring pattern has a corresponding file in the [`templates`](./templates) directory. +Each type of major library structuring pattern has a corresponding file in the [`templates`](https://github.com/Microsoft/TypeScript-Handbook/tree/master/pages/declaration%20files/templates) directory. You can start with these templates to help you get going faster. # Identifying Kinds of Libraries @@ -76,7 +76,7 @@ However, libraries that are small and require the DOM (or have *no* dependencies ### Global Library Template -The template file [`global.d.ts`](./templates/global.d.ts) defines an example library `myLib`. +The template file [`global.d.ts`](https://github.com/Microsoft/TypeScript-Handbook/tree/master/pages/declaration%20files/templates/global.d.ts) defines an example library `myLib`. Be sure to read the ["Preventing Name Conflicts" footnote](#preventing-name-conflicts). ## Modular Libraries @@ -176,9 +176,9 @@ Examples include [jQuery](https://jquery.com/), [Moment.js](http://momentjs.com/ ### Template There are three templates available for modules, - [`module.d.ts`](./templates/module.d.ts), [`module-class.d.ts`](./templates/module-class.d.ts) and [`module-function.d.ts`](./templates/module-function.d.ts). + [`module.d.ts`](https://github.com/Microsoft/TypeScript-Handbook/tree/master/pages/declaration%20files/templates/module.d.ts), [`module-class.d.ts`](https://github.com/Microsoft/TypeScript-Handbook/tree/master/pages/declaration%20files/templates/module-class.d.ts) and [`module-function.d.ts`](https://github.com/Microsoft/TypeScript-Handbook/tree/master/pages/declaration%20files/templates/module-function.d.ts). -Use [`module-function.d.ts`](./templates/module-function.d.ts) if your module can be *called* like a function: +Use [`module-function.d.ts`](https://github.com/Microsoft/TypeScript-Handbook/tree/master/pages/declaration%20files/templates/module-function.d.ts) if your module can be *called* like a function: ```ts var x = require("foo"); @@ -188,7 +188,7 @@ var y = x(42); Be sure to read the [footnote "The Impact of ES6 on Module Call Signatures"](#the-impact-of-es6-on-module-plugins) -Use [`module-class.d.ts`](./templates/module-class.d.ts) if your module can be *constructed* using `new`: +Use [`module-class.d.ts`](https://github.com/Microsoft/TypeScript-Handbook/tree/master/pages/declaration%20files/templates/module-class.d.ts) if your module can be *constructed* using `new`: ```ts var x = require("bar"); @@ -198,7 +198,7 @@ var y = new x("hello"); The same [footnote](#the-impact-of-es6-on-module-plugins) applies to these modules. -If your module is not callable or constructable, use the [`module.d.ts`](./templates/module.d.ts) file. +If your module is not callable or constructable, use the [`module.d.ts`](https://github.com/Microsoft/TypeScript-Handbook/tree/master/pages/declaration%20files/templates/module.d.ts) file. ## *Module Plugin* or *UMD Plugin* @@ -209,7 +209,7 @@ For the purposes of writing a declaration file, you'll write the same code wheth ### Template -Use the [`module-plugin.d.ts`](./templates/module-plugin.d.ts) template. +Use the [`module-plugin.d.ts`](https://github.com/Microsoft/TypeScript-Handbook/tree/master/pages/declaration%20files/templates/module-plugin.d.ts) template. ## *Global Plugin* @@ -236,7 +236,7 @@ console.log(y.reverseAndSort()); ### Template -Use the [`global-plugin.d.ts`](./templates/global-plugin.d.ts) template. +Use the [`global-plugin.d.ts`](https://github.com/Microsoft/TypeScript-Handbook/tree/master/pages/declaration%20files/templates/global-plugin.d.ts) template. ## *Global-modifying Modules* @@ -269,7 +269,7 @@ console.log(y.reverseAndSort()); ### Template -Use the [`global-modifying-module.d.ts`](./templates/global-modifying-module.d.ts) template. +Use the [`global-modifying-module.d.ts`](https://github.com/Microsoft/TypeScript-Handbook/tree/master/pages/declaration%20files/templates/global-modifying-module.d.ts) template. # Consuming Dependencies From 98e10333a32c1d654bb287d1f8faa91e25aedc3d Mon Sep 17 00:00:00 2001 From: Bryan Knight Date: Sun, 10 Jul 2016 19:58:13 -0600 Subject: [PATCH 03/45] fixes typos --- pages/Compiler Options.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/Compiler Options.md b/pages/Compiler Options.md index f9835f2ad..78666ed33 100644 --- a/pages/Compiler Options.md +++ b/pages/Compiler Options.md @@ -26,7 +26,7 @@ Option | Type | Default `--listEmittedFiles` | `boolean` | `false` | Print names of generated files part of the compilation. `--listFiles` | `boolean` | `false` | Print names of files part of the compilation. `--locale` | `string` | *(platform specific)* | The locale to use to show error messages, e.g. en-us. -`--mapRoot` | `string` | `null` | Specifies the location where debugger should locate map files instead of generated locations. Use this flag if the .map files will be located at run-time in a different location than than the .js files. The location specified will be embedded in the sourceMap to direct the debugger where the map files where be located. +`--mapRoot` | `string` | `null` | Specifies the location where debugger should locate map files instead of generated locations. Use this flag if the .map files will be located at run-time in a different location than the .js files. The location specified will be embedded in the sourceMap to direct the debugger where the map files will be located. `--module`
`-m` | `string` | `(target === 'ES6' ? 'ES6' : 'commonjs')` | Specify module code generation: `'none'`, `'commonjs'`, `'amd'`, `'system'`, `'umd'`, `'es6'`, or `'es2015'`.
► Only `'amd'` and `'system'` can be used in conjunction with `--outFile`.
► `'es6'` and `'es2015'` values may not be used when targeting ES5 or lower. `--moduleResolution` | `string` | `(module === 'amd' | 'system' | 'ES6' ? 'classic' : 'node')` | Determine how modules get resolved. Either `'node'` for Node.js/io.js style resolution, or `'classic'` (default). See [Module Resolution documentation](Module Resolution.md) for more details. `--newLine` | `string` | *(platform specific)* | Use the specified end of line sequence to be used when emitting files: `'crlf'` (windows) or `'lf'` (unix)." From 1e4bb0867438aeadc1b4b6c75822b2687dd3d27f Mon Sep 17 00:00:00 2001 From: Bryan Knight Date: Sun, 10 Jul 2016 20:14:08 -0600 Subject: [PATCH 04/45] fixes typo --- pages/Compiler Options.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/Compiler Options.md b/pages/Compiler Options.md index 78666ed33..a067dace7 100644 --- a/pages/Compiler Options.md +++ b/pages/Compiler Options.md @@ -56,7 +56,7 @@ Option | Type | Default `--skipLibCheck` | `boolean` | `false` | Don't check a the default library (`lib.d.ts`) file's valitidy. `--skipDefaultLibCheck` | `boolean` | `false` | Don't check a user-defined default library (`*.d.ts`) file's valitidy. `--sourceMap` | `boolean` | `false` | Generates corresponding '.map' file. -`--sourceRoot` | `string` | `null` | Specifies the location where debugger should locate TypeScript files instead of source locations. Use this flag if the sources will be located at run-time in a different location than that at design-time. The location specified will be embedded in the sourceMap to direct the debugger where the source files where be located. +`--sourceRoot` | `string` | `null` | Specifies the location where debugger should locate TypeScript files instead of source locations. Use this flag if the sources will be located at run-time in a different location than that at design-time. The location specified will be embedded in the sourceMap to direct the debugger where the source files will be located. `--strictNullChecks` | `boolean` | `false` | In strict null checking mode, the `null` and `undefined` values are not in the domain of every type and are only assignable to themselves and `any` (the one exception being that `undefined` is also assignable to `void`). `--stripInternal`[1] | `boolean` | `false` | Do not emit declarations for code that has an `/** @internal */` JSDoc annotation. `--suppressExcessPropertyErrors` | `boolean` | `false` | Suppress excess property checks for object literals. From bda79751cef75290ab91804afccc0476318e20ac Mon Sep 17 00:00:00 2001 From: nino-porcino Date: Wed, 13 Jul 2016 15:41:56 +0200 Subject: [PATCH 05/45] Fixed code typo in Modules.md --- pages/Modules.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/Modules.md b/pages/Modules.md index 3a004cca6..f04c0c165 100644 --- a/pages/Modules.md +++ b/pages/Modules.md @@ -554,7 +554,7 @@ For example: ##### math-lib.d.ts ```ts -export const isPrime(x: number): boolean;' +export const isPrime(x: number): boolean; export as namespace mathLib; ``` From b628e33df0b89f20bb38a4ff0055d7d0aacaf113 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Sun, 17 Jul 2016 17:55:17 +0300 Subject: [PATCH 06/45] Create Keywords.md --- pages/Keywords.md | 98 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 pages/Keywords.md diff --git a/pages/Keywords.md b/pages/Keywords.md new file mode 100644 index 000000000..bffd5f658 --- /dev/null +++ b/pages/Keywords.md @@ -0,0 +1,98 @@ +# Typescript Keywords + +The following keywords have the same meaning in Typescript as they do in Javascript: + +Keyword | Notes +---|--- +async, await | [ES draft](http://tc39.github.io/ecmascript-asyncawait/) +break | | +continue | | +class, extends, constructor, super | `extends` can also be used with `interface` | +const, let, var | `const`can also be used as a modifier for `enum`| +debugger | | +delete | | +do, while | | +export, import | | +for, each, in, of | | +function, return | | +get, set | | +if, else | | +instanceof, typeof | | +null, undefined | Can also refer to the `null` and `undefined` types| +switch, case, default | | +this | | +true, false | | +try, catch, finally | | +void | Can also refer to the `void` type | +yield | | + +Unless otherwise noted, more information can be found on the [Mozilla Developer Network](https://developer.mozilla.org/en-US/docs/Web/JavaScript) or on [MSDN](https://msdn.microsoft.com/en-us/library/d1et7k7c%28v=vs.94%29.aspx) + +--- + +The following keywords are used for [basic type annotations](http://www.typescriptlang.org/docs/handbook/basic-types.html): + +Keyword | Description +---|--- +any | [Describes a type unknown at design time](http://www.typescriptlang.org/docs/handbook/basic-types.html#any) +boolean | [Boolean](http://www.typescriptlang.org/docs/handbook/basic-types.html#boolean) +null | _Missing link_ +never | _Missing link_ +number | [Number](http://www.typescriptlang.org/docs/handbook/basic-types.html#number) +string | [String](http://www.typescriptlang.org/docs/handbook/basic-types.html#string) +symbol | [Symbol](http://www.typescriptlang.org/docs/handbook/symbols.html) +undefined | _Missing link_ +void | _Missing link_ + +Other basic type-related keywords: + +Keyword | Description +---|--- +as | [Type assertion](http://www.typescriptlang.org/docs/handbook/basic-types.html#type-assetions) +is | _Missing link_ + +User-defined types: + +Keyword | Description +---|--- +enum | [Defines an enum](http://www.typescriptlang.org/docs/handbook/enums.html) +type | [Type aliases](http://www.typescriptlang.org/docs/handbook/advanced-types.html#type-aliases) +interface | [Defines the shape of a type (structural typing)](http://www.typescriptlang.org/docs/handbook/interfaces.html) + +Modifiers on user-defined type: + +Keyword | Description | Applies to +---|---|--- +abstract | [Abstract classes (cannot be instantiated; must be inherited)](http://www.typescriptlang.org/docs/handbook/classes.html#abstract-classes) | class +const | [Forces a const enum](http://www.typescriptlang.org/docs/handbook/enums.html) | enum +implements | [Defines a class as implementing a given interface](http://www.typescriptlang.org/docs/handbook/interfaces.html#implementing-an-interface) | class + +Modifiers on **members** of class/interface definitions: + +Keyword | Description +---|--- +abstract | [Inheriting classes must implement this method](http://www.typescriptlang.org/docs/handbook/classes.html#abstract-classes) +static | [Defines a member on the class, and not on the instance](http://www.typescriptlang.org/docs/handbook/classes.html#static-properties) +readonly | [Property can be read, but not written to](https://github.com/Microsoft/TypeScript/pull/6532) +private | [Property can be used only from its containing class](https://www.typescriptlang.org/docs/handbook/classes.html#understanding-private) +protected | [Property can only be used in its containing class, or by classes which inherit from the containing class](https://www.typescriptlang.org/docs/handbook/classes.html#understanding-protected) +public | [Property can be used from outside its containing class](https://www.typescriptlang.org/docs/handbook/classes.html#public-by-default) + +Code organization and environment: + +Keyword | Description +---|--- +declare | [Ambient declarations -- elements created by the environment or other scripts](Missing link) +module | [Define an ambient module](http://www.typescriptlang.org/docs/handbook/modules.html#ambient-modules) +namespace | [Associates the contained types with the specified namespace](http://www.typescriptlang.org/docs/handbook/namespaces.html) +require | [Missing description](http://www.typescriptlang.org/docs/handbook/modules.html#export--and-import--require) + +--- + +Unknown: + +Keyword | +---| +from| +of| +package| From bee295f242448ffb9b9f437676893e7f19154463 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Sun, 17 Jul 2016 18:48:12 +0300 Subject: [PATCH 07/45] Update Keywords.md --- pages/Keywords.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index bffd5f658..878af4f89 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -36,13 +36,12 @@ Keyword | Description ---|--- any | [Describes a type unknown at design time](http://www.typescriptlang.org/docs/handbook/basic-types.html#any) boolean | [Boolean](http://www.typescriptlang.org/docs/handbook/basic-types.html#boolean) -null | _Missing link_ -never | _Missing link_ +null | _Missing Handbook link_ ([Spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#326-the-null-type)) number | [Number](http://www.typescriptlang.org/docs/handbook/basic-types.html#number) string | [String](http://www.typescriptlang.org/docs/handbook/basic-types.html#string) symbol | [Symbol](http://www.typescriptlang.org/docs/handbook/symbols.html) -undefined | _Missing link_ -void | _Missing link_ +undefined | _Missing Handbook link_ ([Spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#327-the-undefined-type)) +void | _Missing Handbook link_ ([Spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#325-the-void-type)) Other basic type-related keywords: From e111598bb2fd5ef48efb16fe5be474c6d2155d2b Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Sun, 17 Jul 2016 19:01:32 +0300 Subject: [PATCH 08/45] Update Keywords.md --- pages/Keywords.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index 878af4f89..5af52b86f 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -54,9 +54,9 @@ User-defined types: Keyword | Description ---|--- -enum | [Defines an enum](http://www.typescriptlang.org/docs/handbook/enums.html) -type | [Type aliases](http://www.typescriptlang.org/docs/handbook/advanced-types.html#type-aliases) -interface | [Defines the shape of a type (structural typing)](http://www.typescriptlang.org/docs/handbook/interfaces.html) +enum | [Defines an enum - a set of named values](http://www.typescriptlang.org/docs/handbook/enums.html) +type | [Type alias](http://www.typescriptlang.org/docs/handbook/advanced-types.html#type-aliases) +interface | [Defines a type by its shape (structural typing)](http://www.typescriptlang.org/docs/handbook/interfaces.html) Modifiers on user-defined type: @@ -72,7 +72,7 @@ Keyword | Description ---|--- abstract | [Inheriting classes must implement this method](http://www.typescriptlang.org/docs/handbook/classes.html#abstract-classes) static | [Defines a member on the class, and not on the instance](http://www.typescriptlang.org/docs/handbook/classes.html#static-properties) -readonly | [Property can be read, but not written to](https://github.com/Microsoft/TypeScript/pull/6532) +readonly | [Property's value can be read, but not written to](https://github.com/Microsoft/TypeScript/pull/6532) private | [Property can be used only from its containing class](https://www.typescriptlang.org/docs/handbook/classes.html#understanding-private) protected | [Property can only be used in its containing class, or by classes which inherit from the containing class](https://www.typescriptlang.org/docs/handbook/classes.html#understanding-protected) public | [Property can be used from outside its containing class](https://www.typescriptlang.org/docs/handbook/classes.html#public-by-default) From f2581742b84ff26ae54bfe9a8f3ab07229f293ce Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Sun, 17 Jul 2016 21:49:41 +0300 Subject: [PATCH 09/45] lowercase type names, relative URLs --- pages/Keywords.md | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index 5af52b86f..a3caf1e9b 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -34,57 +34,58 @@ The following keywords are used for [basic type annotations](http://www.typescri Keyword | Description ---|--- -any | [Describes a type unknown at design time](http://www.typescriptlang.org/docs/handbook/basic-types.html#any) -boolean | [Boolean](http://www.typescriptlang.org/docs/handbook/basic-types.html#boolean) +any | [Describes a type unknown at design time](basic%20types.md#any) +boolean | [boolean](basic%20types.md#boolean) +never | _Missing linl_ null | _Missing Handbook link_ ([Spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#326-the-null-type)) -number | [Number](http://www.typescriptlang.org/docs/handbook/basic-types.html#number) -string | [String](http://www.typescriptlang.org/docs/handbook/basic-types.html#string) -symbol | [Symbol](http://www.typescriptlang.org/docs/handbook/symbols.html) +number | [number](basic%20types.md#number) +string | [string](basic%20types.md#string) +symbol | [Symbol](symbols.md) undefined | _Missing Handbook link_ ([Spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#327-the-undefined-type)) -void | _Missing Handbook link_ ([Spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#325-the-void-type)) +void | [void](Basic%20Types.md#void) Other basic type-related keywords: Keyword | Description ---|--- -as | [Type assertion](http://www.typescriptlang.org/docs/handbook/basic-types.html#type-assetions) +as | [Type assertion](basic%20types.md#type-assetions) is | _Missing link_ User-defined types: Keyword | Description ---|--- -enum | [Defines an enum - a set of named values](http://www.typescriptlang.org/docs/handbook/enums.html) -type | [Type alias](http://www.typescriptlang.org/docs/handbook/advanced-types.html#type-aliases) -interface | [Defines a type by its shape (structural typing)](http://www.typescriptlang.org/docs/handbook/interfaces.html) +enum | [Defines an enum - a set of named values](enums.md) +type | [Type alias](advanced%20types.md#type-aliases) +interface | [Defines a type by its shape (structural typing)](interfaces.md) Modifiers on user-defined type: Keyword | Description | Applies to ---|---|--- -abstract | [Abstract classes (cannot be instantiated; must be inherited)](http://www.typescriptlang.org/docs/handbook/classes.html#abstract-classes) | class -const | [Forces a const enum](http://www.typescriptlang.org/docs/handbook/enums.html) | enum -implements | [Defines a class as implementing a given interface](http://www.typescriptlang.org/docs/handbook/interfaces.html#implementing-an-interface) | class +abstract | [Abstract classes (cannot be instantiated; must be inherited)](classes.md#abstract-classes) | class +const | [Forces a const enum](enums.md) | enum +implements | [Defines a class as implementing a given interface](interfaces.md#implementing-an-interface) | class Modifiers on **members** of class/interface definitions: Keyword | Description ---|--- -abstract | [Inheriting classes must implement this method](http://www.typescriptlang.org/docs/handbook/classes.html#abstract-classes) -static | [Defines a member on the class, and not on the instance](http://www.typescriptlang.org/docs/handbook/classes.html#static-properties) +abstract | [Inheriting classes must implement this method](classes.md#abstract-classes) +static | [Defines a member on the class, and not on the instance](classes.md#static-properties) readonly | [Property's value can be read, but not written to](https://github.com/Microsoft/TypeScript/pull/6532) -private | [Property can be used only from its containing class](https://www.typescriptlang.org/docs/handbook/classes.html#understanding-private) -protected | [Property can only be used in its containing class, or by classes which inherit from the containing class](https://www.typescriptlang.org/docs/handbook/classes.html#understanding-protected) -public | [Property can be used from outside its containing class](https://www.typescriptlang.org/docs/handbook/classes.html#public-by-default) +private | [Property can be used only from its containing class](classes.md#understanding-private) +protected | [Property can only be used in its containing class, or by classes which inherit from the containing class](classes.md#understanding-protected) +public | [Property can be used from outside its containing class](classes.md#public-by-default) Code organization and environment: Keyword | Description ---|--- declare | [Ambient declarations -- elements created by the environment or other scripts](Missing link) -module | [Define an ambient module](http://www.typescriptlang.org/docs/handbook/modules.html#ambient-modules) -namespace | [Associates the contained types with the specified namespace](http://www.typescriptlang.org/docs/handbook/namespaces.html) -require | [Missing description](http://www.typescriptlang.org/docs/handbook/modules.html#export--and-import--require) +module | [Define an ambient module](modules.md#ambient-modules) +namespace | [Associates the contained types with the specified namespace](namespaces.md) +require | [Missing description](modules.md#export--and-import--require) --- From e3aaf0904c15dbbfd8b617875b365fe878b15e49 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 18 Jul 2016 00:05:50 +0300 Subject: [PATCH 10/45] Update Keywords.md --- pages/Keywords.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index a3caf1e9b..44a561259 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -36,12 +36,12 @@ Keyword | Description ---|--- any | [Describes a type unknown at design time](basic%20types.md#any) boolean | [boolean](basic%20types.md#boolean) -never | _Missing linl_ -null | _Missing Handbook link_ ([Spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#326-the-null-type)) +never | _Missing link_ +null | [null](Basic%20Types.md#null-and-undefined) number | [number](basic%20types.md#number) string | [string](basic%20types.md#string) symbol | [Symbol](symbols.md) -undefined | _Missing Handbook link_ ([Spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#327-the-undefined-type)) +undefined | [undefined](Basic%20Types.md#null-and-undefined) void | [void](Basic%20Types.md#void) Other basic type-related keywords: @@ -49,7 +49,7 @@ Other basic type-related keywords: Keyword | Description ---|--- as | [Type assertion](basic%20types.md#type-assetions) -is | _Missing link_ +is | [User-defined type guards](advanced%20types.md#user-defined-type-guards) User-defined types: @@ -82,7 +82,9 @@ Code organization and environment: Keyword | Description ---|--- +as | [Module import renaming(Spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#1132-import-declarations) declare | [Ambient declarations -- elements created by the environment or other scripts](Missing link) +from | [Import declarations (spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#1132-import-declarations) module | [Define an ambient module](modules.md#ambient-modules) namespace | [Associates the contained types with the specified namespace](namespaces.md) require | [Missing description](modules.md#export--and-import--require) @@ -93,6 +95,5 @@ Unknown: Keyword | ---| -from| of| package| From 3c23ce87e0007200f087feab94bcdf6fc6658c50 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Tue, 19 Jul 2016 02:07:02 +0300 Subject: [PATCH 11/45] Alphabetical order, and single list --- pages/Keywords.md | 159 +++++++++++++++++++++------------------------- 1 file changed, 71 insertions(+), 88 deletions(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index 44a561259..2de22d66a 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -1,99 +1,82 @@ -# Typescript Keywords +# Keywords The following keywords have the same meaning in Typescript as they do in Javascript: -Keyword | Notes ----|--- -async, await | [ES draft](http://tc39.github.io/ecmascript-asyncawait/) -break | | -continue | | -class, extends, constructor, super | `extends` can also be used with `interface` | -const, let, var | `const`can also be used as a modifier for `enum`| -debugger | | -delete | | -do, while | | -export, import | | -for, each, in, of | | -function, return | | -get, set | | -if, else | | -instanceof, typeof | | -null, undefined | Can also refer to the `null` and `undefined` types| -switch, case, default | | -this | | -true, false | | -try, catch, finally | | -void | Can also refer to the `void` type | -yield | | - -Unless otherwise noted, more information can be found on the [Mozilla Developer Network](https://developer.mozilla.org/en-US/docs/Web/JavaScript) or on [MSDN](https://msdn.microsoft.com/en-us/library/d1et7k7c%28v=vs.94%29.aspx) - ---- - -The following keywords are used for [basic type annotations](http://www.typescriptlang.org/docs/handbook/basic-types.html): - -Keyword | Description ----|--- -any | [Describes a type unknown at design time](basic%20types.md#any) -boolean | [boolean](basic%20types.md#boolean) -never | _Missing link_ -null | [null](Basic%20Types.md#null-and-undefined) -number | [number](basic%20types.md#number) -string | [string](basic%20types.md#string) -symbol | [Symbol](symbols.md) -undefined | [undefined](Basic%20Types.md#null-and-undefined) -void | [void](Basic%20Types.md#void) - -Other basic type-related keywords: - -Keyword | Description ----|--- -as | [Type assertion](basic%20types.md#type-assetions) -is | [User-defined type guards](advanced%20types.md#user-defined-type-guards) - -User-defined types: - -Keyword | Description ----|--- -enum | [Defines an enum - a set of named values](enums.md) -type | [Type alias](advanced%20types.md#type-aliases) -interface | [Defines a type by its shape (structural typing)](interfaces.md) - -Modifiers on user-defined type: - -Keyword | Description | Applies to +Keyword | Category | Description / links ---|---|--- -abstract | [Abstract classes (cannot be instantiated; must be inherited)](classes.md#abstract-classes) | class -const | [Forces a const enum](enums.md) | enum -implements | [Defines a class as implementing a given interface](interfaces.md#implementing-an-interface) | class - -Modifiers on **members** of class/interface definitions: - -Keyword | Description ----|--- -abstract | [Inheriting classes must implement this method](classes.md#abstract-classes) -static | [Defines a member on the class, and not on the instance](classes.md#static-properties) -readonly | [Property's value can be read, but not written to](https://github.com/Microsoft/TypeScript/pull/6532) -private | [Property can be used only from its containing class](classes.md#understanding-private) -protected | [Property can only be used in its containing class, or by classes which inherit from the containing class](classes.md#understanding-protected) -public | [Property can be used from outside its containing class](classes.md#public-by-default) - -Code organization and environment: - -Keyword | Description ----|--- -as | [Module import renaming(Spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#1132-import-declarations) -declare | [Ambient declarations -- elements created by the environment or other scripts](Missing link) -from | [Import declarations (spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#1132-import-declarations) -module | [Define an ambient module](modules.md#ambient-modules) -namespace | [Associates the contained types with the specified namespace](namespaces.md) -require | [Missing description](modules.md#export--and-import--require) +abstract class | Classes | [Abstract classes (cannot be instantiated; must be inherited)](classes.md#abstract-classes) +abstract _method_ | Classes | [Inheriting classes must implement this method](classes.md#abstract-classes) +any | Type annotation | [Describes a type unknown at design time](basic%20types.md#any) +as | Type operation | [Type assertion](basic%20types.md#type-assetions) +as | Environment / modules | [Module import renaming](modules.md#import) +async | Asynchronous functions | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) +await | Asynchronous functions | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) +boolean | Type annotation | [`boolean` type](basic%20types.md#boolean) +break | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/break) +case | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) +continue | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/continue) +class | Classes | [Class definition](classes.md) +const | Variable declaration | [`const` declaration](variable%20declarations.md#const-declarations) +const | User-defined-type modifier | [Forces a const enum](enums.md) +constructor | Classes | [Constructor functions](classes.md#constructor-functions) +debugger | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) +declare | Environment / modules | [Ambient declarations](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#12-ambients) +default | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/default) +default | Enivronment / modules | [Default exports](modules#default-exports) +delete | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) +do...while | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/do...while) +enum | User-defined type | [Defines a set of named values](enums.md) +export | Environment / modules | [Allow access to module elements outside the module](modules.md#export) +extends | User-defined-type modifier | [Inheritance](classes.md#inheritance) +false | Literal | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) +for | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for) +for...in | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in) +for...of | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) +from "_path_" | Enivronment / modules | [Location of imported module](modules.md#import) +get | Classes | [Getters](classes.md#accessors) +function | Functions | [Function declaration](functions.md#functions) +if...else | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) +_class_ implements _interface_ | User-defined-type modifier | [Class must match the shape of the interface](interfaces.md#implementing-an-interface) +import | Environment / modules | [Enable access to exported elements in a module](modules.md#import) +import _symbol_ | Environment / modules | [Synbol aliases](namespaces.md#aliases) +instanceof | Type operations | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof) +interface | User-defined type | [Defines a type by its shape (structural typing)](interfaces.md) +let | Variable declaration | [`let` declaration](variable%20declarations.md#let-declarations) +module | Environment / modules | [Define an ambient module](modules.md#ambient-modules) +namespace | Environment / modules | [Associates the contained elements with the specified namespace](namespaces.md) +never | Type annotation | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) +null | Literal | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null) +null | Type annotation | [`null` type](basic%20types.md#null-and-undefined) +number | Type annotation | [`number` type](basic%20types.md#number) +private | Accessibility modifier | [Property can be used only from its containing class](classes.md#understanding-private) +protected | Accessibility modifier | [Property can only be used in its containing class, or by classes which inherit from the containing class](classes.md#understanding-protected) +public | Accessibility modifier | [Property can be used from outside its containing class](classes.md#public-by-default) +readonly | Member modifier | [Property's value can be read, but not written to](classes.md#readonly-modifier) +require | Environment / modules | [Import the custom object defined in a module with `export =` ](modules.md#export--and-import--require) +return | Functions | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return) +set | Classes | [Setters](classes.md#accessors) +static | Classes | [Static properties](classes.md#static-properties) +string | Type annotation | [`string` type](basic%20types.md#string) +super | Classes | Reference to properties / constructor of the base class [(spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#49-the-super-keyword) +switch | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) +symbol | Type annotation | [Symbol type](symbols.md) +this | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) +this is _T_ | | `this`-based type guards [(spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#69-type-guard-functions) +true | Literal | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) +try...catch...finally | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) +type | User-defined type | [Type alias](advanced%20types.md#type-aliases) +typeof | Type operations | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) +undefined | Literal | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined) +undefined | Type annotation | [`undefined` type](basic%20types.md#null-and-undefined) +var | Variable declaration | [`var` declaration](variable%20declarations.md#var-declarations) +void | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void) +void | Type annotation | [`void` type](basic%20types.md#void) +while | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while) +yield | Generator functions | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) ---- Unknown: Keyword | ---| -of| package| From 3110858848b0bb14d055f919b317f508c5ec2bb3 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Tue, 19 Jul 2016 02:29:18 +0300 Subject: [PATCH 12/45] Fixed broken lowercase links to Handbook --- pages/Keywords.md | 78 +++++++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index 2de22d66a..386aba491 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -4,73 +4,73 @@ The following keywords have the same meaning in Typescript as they do in Javascr Keyword | Category | Description / links ---|---|--- -abstract class | Classes | [Abstract classes (cannot be instantiated; must be inherited)](classes.md#abstract-classes) -abstract _method_ | Classes | [Inheriting classes must implement this method](classes.md#abstract-classes) -any | Type annotation | [Describes a type unknown at design time](basic%20types.md#any) -as | Type operation | [Type assertion](basic%20types.md#type-assetions) -as | Environment / modules | [Module import renaming](modules.md#import) +abstract class | Classes | [Abstract classes (cannot be instantiated; must be inherited)](Classes.md#abstract-classes) +abstract _method_ | Classes | [Inheriting classes must implement this method](Classes.md#abstract-classes) +any | Type annotation | [Describes a type unknown at design time](Basic%20Types.md#any) +as | Type operation | [Type assertion](Basic%20Types.md#type-assetions) +as | Environment / modules | [Module import renaming](Modules.md#import) async | Asynchronous functions | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) await | Asynchronous functions | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) -boolean | Type annotation | [`boolean` type](basic%20types.md#boolean) +boolean | Type annotation | [`boolean` type](Basic%20Types.md#boolean) break | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/break) case | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) continue | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/continue) -class | Classes | [Class definition](classes.md) -const | Variable declaration | [`const` declaration](variable%20declarations.md#const-declarations) -const | User-defined-type modifier | [Forces a const enum](enums.md) -constructor | Classes | [Constructor functions](classes.md#constructor-functions) +class | Classes | [Class definition](Classes.md) +const | Variable declaration | [`const` declaration](Variable%20Declarations.md#const-declarations) +const | User-defined-type modifier | [Forces a const enum](Enums.md) +constructor | Classes | [Constructor functions](Classes.md#constructor-functions) debugger | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) declare | Environment / modules | [Ambient declarations](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#12-ambients) default | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/default) -default | Enivronment / modules | [Default exports](modules#default-exports) +default | Enivronment / modules | [Default exports](Modules.md#default-exports) delete | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) do...while | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/do...while) -enum | User-defined type | [Defines a set of named values](enums.md) -export | Environment / modules | [Allow access to module elements outside the module](modules.md#export) -extends | User-defined-type modifier | [Inheritance](classes.md#inheritance) +enum | User-defined type | [Defines a set of named values](Enums.md) +export | Environment / modules | [Allow access to module elements outside the module](Modules.md#export) +extends | User-defined-type modifier | [Inheritance](Classes.md#inheritance) false | Literal | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) for | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for) for...in | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in) for...of | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) -from "_path_" | Enivronment / modules | [Location of imported module](modules.md#import) -get | Classes | [Getters](classes.md#accessors) -function | Functions | [Function declaration](functions.md#functions) +from "_path_" | Enivronment / modules | [Location of imported module](Modules.md#import) +get | Classes | [Getters](Classes.md#accessors) +function | Functions | [Function declaration](Functions.md#functions) if...else | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) -_class_ implements _interface_ | User-defined-type modifier | [Class must match the shape of the interface](interfaces.md#implementing-an-interface) -import | Environment / modules | [Enable access to exported elements in a module](modules.md#import) -import _symbol_ | Environment / modules | [Synbol aliases](namespaces.md#aliases) +_class_ implements _interface_ | User-defined-type modifier | [Class must match the shape of the interface](Interfaces.md#implementing-an-interface) +import | Environment / modules | [Enable access to exported elements in a module](Modules.md#import) +import _symbol_ | Environment / modules | [Synbol aliases](Namespaces.md#aliases) instanceof | Type operations | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof) -interface | User-defined type | [Defines a type by its shape (structural typing)](interfaces.md) -let | Variable declaration | [`let` declaration](variable%20declarations.md#let-declarations) -module | Environment / modules | [Define an ambient module](modules.md#ambient-modules) -namespace | Environment / modules | [Associates the contained elements with the specified namespace](namespaces.md) +interface | User-defined type | [Defines a type by its shape (structural typing)](Interfaces.md) +let | Variable declaration | [`let` declaration](Variable%20Declarations.md#let-declarations) +module | Environment / modules | [Define an ambient module](Modules.md#ambient-modules) +namespace | Environment / modules | [Associates the contained elements with the specified namespace](Namespaces.md) never | Type annotation | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) null | Literal | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null) -null | Type annotation | [`null` type](basic%20types.md#null-and-undefined) -number | Type annotation | [`number` type](basic%20types.md#number) -private | Accessibility modifier | [Property can be used only from its containing class](classes.md#understanding-private) -protected | Accessibility modifier | [Property can only be used in its containing class, or by classes which inherit from the containing class](classes.md#understanding-protected) -public | Accessibility modifier | [Property can be used from outside its containing class](classes.md#public-by-default) -readonly | Member modifier | [Property's value can be read, but not written to](classes.md#readonly-modifier) -require | Environment / modules | [Import the custom object defined in a module with `export =` ](modules.md#export--and-import--require) +null | Type annotation | [`null` type](Basic%20Types.md#null-and-undefined) +number | Type annotation | [`number` type](Basic%20Types.md#number) +private | Accessibility modifier | [Property can be used only from its containing class](Classes.md#understanding-private) +protected | Accessibility modifier | [Property can only be used in its containing class, or by classes which inherit from the containing class](Classes.md#understanding-protected) +public | Accessibility modifier | [Property can be used from outside its containing class](Classes.md#public-by-default) +readonly | Member modifier | [Property's value can be read, but not written to](Classes.md#readonly-modifier) +require | Environment / modules | [Import the custom object defined in a module with `export =` ](Modules.md#export--and-import--require) return | Functions | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return) -set | Classes | [Setters](classes.md#accessors) -static | Classes | [Static properties](classes.md#static-properties) -string | Type annotation | [`string` type](basic%20types.md#string) +set | Classes | [Setters](Classes.md#accessors) +static | Classes | [Static properties](Classes.md#static-properties) +string | Type annotation | [`string` type](Basic%20Types.md#string) super | Classes | Reference to properties / constructor of the base class [(spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#49-the-super-keyword) switch | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) -symbol | Type annotation | [Symbol type](symbols.md) +symbol | Type annotation | [Symbol type](Symbols.md) this | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) this is _T_ | | `this`-based type guards [(spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#69-type-guard-functions) true | Literal | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) try...catch...finally | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) -type | User-defined type | [Type alias](advanced%20types.md#type-aliases) +type | User-defined type | [Type alias](Advanced%20Types.md#type-aliases) typeof | Type operations | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) undefined | Literal | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined) -undefined | Type annotation | [`undefined` type](basic%20types.md#null-and-undefined) -var | Variable declaration | [`var` declaration](variable%20declarations.md#var-declarations) +undefined | Type annotation | [`undefined` type](Basic%20Types.md#null-and-undefined) +var | Variable declaration | [`var` declaration](Variable%20Declarations.md#var-declarations) void | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void) -void | Type annotation | [`void` type](basic%20types.md#void) +void | Type annotation | [`void` type](Basic%20Types.md#void) while | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while) yield | Generator functions | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) From e11fa2fde5a5ce01c71504dee69f6e6c9d9d40f6 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Tue, 19 Jul 2016 02:30:50 +0300 Subject: [PATCH 13/45] Update Keywords.md --- pages/Keywords.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index 386aba491..1281cc923 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -7,7 +7,7 @@ Keyword | Category | Description / links abstract class | Classes | [Abstract classes (cannot be instantiated; must be inherited)](Classes.md#abstract-classes) abstract _method_ | Classes | [Inheriting classes must implement this method](Classes.md#abstract-classes) any | Type annotation | [Describes a type unknown at design time](Basic%20Types.md#any) -as | Type operation | [Type assertion](Basic%20Types.md#type-assetions) +as | Type operation | [Type assertion](Basic%20Types.md#type-assertions) as | Environment / modules | [Module import renaming](Modules.md#import) async | Asynchronous functions | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) await | Asynchronous functions | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) From 67e33c8ab7fa4f6e24ca7abcb0ef4dd4d9f1da74 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Tue, 19 Jul 2016 02:57:29 +0300 Subject: [PATCH 14/45] Added code formatting to keywords --- pages/Keywords.md | 147 ++++++++++++++++++++++------------------------ 1 file changed, 69 insertions(+), 78 deletions(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index 1281cc923..aa9914ee2 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -1,82 +1,73 @@ # Keywords -The following keywords have the same meaning in Typescript as they do in Javascript: - Keyword | Category | Description / links ---|---|--- -abstract class | Classes | [Abstract classes (cannot be instantiated; must be inherited)](Classes.md#abstract-classes) -abstract _method_ | Classes | [Inheriting classes must implement this method](Classes.md#abstract-classes) -any | Type annotation | [Describes a type unknown at design time](Basic%20Types.md#any) -as | Type operation | [Type assertion](Basic%20Types.md#type-assertions) -as | Environment / modules | [Module import renaming](Modules.md#import) -async | Asynchronous functions | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) -await | Asynchronous functions | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) -boolean | Type annotation | [`boolean` type](Basic%20Types.md#boolean) -break | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/break) -case | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) -continue | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/continue) -class | Classes | [Class definition](Classes.md) -const | Variable declaration | [`const` declaration](Variable%20Declarations.md#const-declarations) -const | User-defined-type modifier | [Forces a const enum](Enums.md) -constructor | Classes | [Constructor functions](Classes.md#constructor-functions) -debugger | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) -declare | Environment / modules | [Ambient declarations](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#12-ambients) -default | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/default) -default | Enivronment / modules | [Default exports](Modules.md#default-exports) -delete | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) -do...while | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/do...while) -enum | User-defined type | [Defines a set of named values](Enums.md) -export | Environment / modules | [Allow access to module elements outside the module](Modules.md#export) -extends | User-defined-type modifier | [Inheritance](Classes.md#inheritance) -false | Literal | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) -for | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for) -for...in | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in) -for...of | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) -from "_path_" | Enivronment / modules | [Location of imported module](Modules.md#import) -get | Classes | [Getters](Classes.md#accessors) -function | Functions | [Function declaration](Functions.md#functions) -if...else | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) -_class_ implements _interface_ | User-defined-type modifier | [Class must match the shape of the interface](Interfaces.md#implementing-an-interface) -import | Environment / modules | [Enable access to exported elements in a module](Modules.md#import) -import _symbol_ | Environment / modules | [Synbol aliases](Namespaces.md#aliases) -instanceof | Type operations | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof) -interface | User-defined type | [Defines a type by its shape (structural typing)](Interfaces.md) -let | Variable declaration | [`let` declaration](Variable%20Declarations.md#let-declarations) -module | Environment / modules | [Define an ambient module](Modules.md#ambient-modules) -namespace | Environment / modules | [Associates the contained elements with the specified namespace](Namespaces.md) -never | Type annotation | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) -null | Literal | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null) -null | Type annotation | [`null` type](Basic%20Types.md#null-and-undefined) -number | Type annotation | [`number` type](Basic%20Types.md#number) -private | Accessibility modifier | [Property can be used only from its containing class](Classes.md#understanding-private) -protected | Accessibility modifier | [Property can only be used in its containing class, or by classes which inherit from the containing class](Classes.md#understanding-protected) -public | Accessibility modifier | [Property can be used from outside its containing class](Classes.md#public-by-default) -readonly | Member modifier | [Property's value can be read, but not written to](Classes.md#readonly-modifier) -require | Environment / modules | [Import the custom object defined in a module with `export =` ](Modules.md#export--and-import--require) -return | Functions | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return) -set | Classes | [Setters](Classes.md#accessors) -static | Classes | [Static properties](Classes.md#static-properties) -string | Type annotation | [`string` type](Basic%20Types.md#string) -super | Classes | Reference to properties / constructor of the base class [(spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#49-the-super-keyword) -switch | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) -symbol | Type annotation | [Symbol type](Symbols.md) -this | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) -this is _T_ | | `this`-based type guards [(spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#69-type-guard-functions) -true | Literal | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) -try...catch...finally | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) -type | User-defined type | [Type alias](Advanced%20Types.md#type-aliases) -typeof | Type operations | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) -undefined | Literal | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined) -undefined | Type annotation | [`undefined` type](Basic%20Types.md#null-and-undefined) -var | Variable declaration | [`var` declaration](Variable%20Declarations.md#var-declarations) -void | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void) -void | Type annotation | [`void` type](Basic%20Types.md#void) -while | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while) -yield | Generator functions | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) - - -Unknown: - -Keyword | ----| -package| +`abstract class` | Classes | [Abstract classes (cannot be instantiated; must be inherited)](Classes.md#abstract-classes) +`abstract` _method_ | Classes | [Inheriting classes must implement this method](Classes.md#abstract-classes) +`any` | Type annotation | [Describes a type unknown at design time](Basic%20Types.md#any) +`as` | Type operation | [Type assertion](Basic%20Types.md#type-assertions) +`as` | Environment/modules | [Module import renaming](Modules.md#import) +`async` | Asynchronous functions | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) +`await` | Asynchronous functions | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) +`boolean` | Type annotation | [`boolean` type](Basic%20Types.md#boolean) +`break` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/break) +`case` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) +`continue` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/continue) +`class` | Classes | [Class definition](Classes.md) +`const` | Variable declaration | [`const` declaration](Variable%20Declarations.md#const-declarations) +`const enum` | User-defined-type modifier | [Forces a const enum](Enums.md) +`constructor` | Classes | [Constructor functions](Classes.md#constructor-functions) +`debugger` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) +`declare` | Environment/modules | [Ambient declarations](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#12-ambients) +`default` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/default) +`default` | Enivronment/modules | [Default exports](Modules.md#default-exports) +`delete` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) +`do`...`while` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/do...while) +`enum` | User-defined type | [Defines a set of named values](Enums.md) +`export` | Environment/modules | [Allow access to module elements outside the module](Modules.md#export) +`extends` | User-defined-type modifier | [Inheritance](Classes.md#inheritance) +`false` | Literal | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) +`for` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for) +`for`...`in` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in) +`for`...`of` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) +`from "`_path_`"` | Enivronment/modules | [Location of imported module](Modules.md#import) +`get` | Classes | [Getters](Classes.md#accessors) +`function` | Functions | [Function declaration](Functions.md#functions) +`if`...`else` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) +_class_ `implements` _interface_ | User-defined-type modifier | [Class must match the shape of the interface](Interfaces.md#implementing-an-interface) +`import` | Environment/modules | [Enable access to exported elements in a module](Modules.md#import) +`import` _symbol_ | Environment/modules | [Synbol aliases](Namespaces.md#aliases) +`instanceof` | Type operations | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof) +`interface` | User-defined type | [Defines a type by its shape (structural typing)](Interfaces.md) +`let` | Variable declaration | [`let` declaration](Variable%20Declarations.md#let-declarations) +`module` | Environment/modules | [Define an ambient module](Modules.md#ambient-modules) +`namespace` | Environment/modules | [Associates the contained elements with the specified namespace](Namespaces.md) +`never` | Type annotation | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) +`null` | Literal | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null) +`null` | Type annotation | [`null` type](Basic%20Types.md#null-and-undefined) +`number` | Type annotation | [`number` type](Basic%20Types.md#number) +`private` | Accessibility modifier | [Property can be used only from its containing class](Classes.md#understanding-private) +`protected` | Accessibility modifier | [Property can only be used in its containing class, or by classes which inherit from the containing class](Classes.md#understanding-protected) +`public` | Accessibility modifier | [Property can be used from outside its containing class](Classes.md#public-by-default) +`readonly` | Member modifier | [Property's value can be read, but not written to](Classes.md#readonly-modifier) +`require` | Environment/modules | [Import the custom object defined in a module with `export =` ](Modules.md#export--and-import--require) +`return` | Functions | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return) +`set` | Classes | [Setters](Classes.md#accessors) +`static` | Classes | [Static properties](Classes.md#static-properties) +`string` | Type annotation | [`string` type](Basic%20Types.md#string) +`super` | Classes | Reference to properties / constructor of the base class [(spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#49-the-super-keyword) +`switch` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) +`symbol` | Type annotation | [Symbol type](Symbols.md) +`this` | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) +`this is` _T_ | | `this`-based type guards [(spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#69-type-guard-functions) +`true` | Literal | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) +`try`...`catch`...`finally` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) +`type` | User-defined type | [Type alias](Advanced%20Types.md#type-aliases) +`typeof` | Type operations | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) +`undefined` | Literal | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined) +`undefined` | Type annotation | [`undefined` type](Basic%20Types.md#null-and-undefined) +`var` | Variable declaration | [`var` declaration](Variable%20Declarations.md#var-declarations) +`void` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void) +`void` | Type annotation | [`void` type](Basic%20Types.md#void) +`while` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while) +`yield` | Generator functions | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) From ab67fa5be117c9afa01cb6ed2f06d5747599abd9 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Tue, 19 Jul 2016 03:38:38 +0300 Subject: [PATCH 15/45] Added polymorphic `this` types and `this` function parameters --- pages/Keywords.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pages/Keywords.md b/pages/Keywords.md index aa9914ee2..5de5bfdb1 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -59,6 +59,8 @@ _class_ `implements` _interface_ | User-defined-type modifier | [Class must matc `switch` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) `symbol` | Type annotation | [Symbol type](Symbols.md) `this` | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) +`this` | Type annotation | [Polymorphic `this` types in class/interface](Advanced%20Types#polymorphic-this-types) +`function` _name_`(this: ` _annotation_) | | [`This` parameter](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#specifying-the-type-of-this-for-functions) `this is` _T_ | | `this`-based type guards [(spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#69-type-guard-functions) `true` | Literal | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) `try`...`catch`...`finally` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) From 102a30fe0f57302b9c317b9e12682b14260e999b Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Tue, 19 Jul 2016 03:40:04 +0300 Subject: [PATCH 16/45] Update Keywords.md --- pages/Keywords.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index 5de5bfdb1..8de30d569 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -60,7 +60,7 @@ _class_ `implements` _interface_ | User-defined-type modifier | [Class must matc `symbol` | Type annotation | [Symbol type](Symbols.md) `this` | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) `this` | Type annotation | [Polymorphic `this` types in class/interface](Advanced%20Types#polymorphic-this-types) -`function` _name_`(this: ` _annotation_) | | [`This` parameter](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#specifying-the-type-of-this-for-functions) +`function` _name_`(this: ` _annotation_) | | [`this` parameter](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#specifying-the-type-of-this-for-functions) `this is` _T_ | | `this`-based type guards [(spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#69-type-guard-functions) `true` | Literal | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) `try`...`catch`...`finally` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) From 0bb4aeb023042a56c47f4398a64c03bb067d6fee Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Tue, 19 Jul 2016 03:55:29 +0300 Subject: [PATCH 17/45] Added link - user-defined type guards --- pages/Keywords.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index 8de30d569..71a64de16 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -61,7 +61,7 @@ _class_ `implements` _interface_ | User-defined-type modifier | [Class must matc `this` | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) `this` | Type annotation | [Polymorphic `this` types in class/interface](Advanced%20Types#polymorphic-this-types) `function` _name_`(this: ` _annotation_) | | [`this` parameter](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#specifying-the-type-of-this-for-functions) -`this is` _T_ | | `this`-based type guards [(spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#69-type-guard-functions) +`this is` _T_ | | [User-defined type guards](Advanced%20Types#user-defined-type-guards) `true` | Literal | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) `try`...`catch`...`finally` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) `type` | User-defined type | [Type alias](Advanced%20Types.md#type-aliases) From 3fa50b8d9202a8c04757534a6dade6d157ace405 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Tue, 19 Jul 2016 03:57:12 +0300 Subject: [PATCH 18/45] Update Keywords.md --- pages/Keywords.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index 71a64de16..89fcbe944 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -59,9 +59,9 @@ _class_ `implements` _interface_ | User-defined-type modifier | [Class must matc `switch` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) `symbol` | Type annotation | [Symbol type](Symbols.md) `this` | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) -`this` | Type annotation | [Polymorphic `this` types in class/interface](Advanced%20Types#polymorphic-this-types) +`this` | Type annotation | [Polymorphic `this` types in class/interface](Advanced%20Types.md#polymorphic-this-types) `function` _name_`(this: ` _annotation_) | | [`this` parameter](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#specifying-the-type-of-this-for-functions) -`this is` _T_ | | [User-defined type guards](Advanced%20Types#user-defined-type-guards) +`this is` _T_ | | [User-defined type guards](Advanced%20Types.md#user-defined-type-guards) `true` | Literal | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) `try`...`catch`...`finally` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) `type` | User-defined type | [Type alias](Advanced%20Types.md#type-aliases) From d87c35e3342c14cc7bc790e0505e106f857ff949 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Tue, 19 Jul 2016 08:34:03 +0300 Subject: [PATCH 19/45] Fixed space in link line 53 --- pages/Keywords.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index 89fcbe944..2d7565f7e 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -50,7 +50,7 @@ _class_ `implements` _interface_ | User-defined-type modifier | [Class must matc `protected` | Accessibility modifier | [Property can only be used in its containing class, or by classes which inherit from the containing class](Classes.md#understanding-protected) `public` | Accessibility modifier | [Property can be used from outside its containing class](Classes.md#public-by-default) `readonly` | Member modifier | [Property's value can be read, but not written to](Classes.md#readonly-modifier) -`require` | Environment/modules | [Import the custom object defined in a module with `export =` ](Modules.md#export--and-import--require) +`require` | Environment/modules | [Import the custom object defined in a module with `export =`](Modules.md#export--and-import--require) `return` | Functions | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return) `set` | Classes | [Setters](Classes.md#accessors) `static` | Classes | [Static properties](Classes.md#static-properties) From eb2b912e5523ca90d485a0b4e54af5fb4612c8e7 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Tue, 19 Jul 2016 08:53:40 +0300 Subject: [PATCH 20/45] Update Keywords.md --- pages/Keywords.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index 2d7565f7e..5c4ec0bfc 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -60,7 +60,7 @@ _class_ `implements` _interface_ | User-defined-type modifier | [Class must matc `symbol` | Type annotation | [Symbol type](Symbols.md) `this` | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) `this` | Type annotation | [Polymorphic `this` types in class/interface](Advanced%20Types.md#polymorphic-this-types) -`function` _name_`(this: ` _annotation_) | | [`this` parameter](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#specifying-the-type-of-this-for-functions) +`function` [_name_]`(this: ` _annotation_) | | [`this` parameter](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#specifying-the-type-of-this-for-functions) `this is` _T_ | | [User-defined type guards](Advanced%20Types.md#user-defined-type-guards) `true` | Literal | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) `try`...`catch`...`finally` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) From cbbd49f182e4a5b60c9c9b89abf2fe93b1a92abb Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Tue, 19 Jul 2016 11:54:16 +0200 Subject: [PATCH 21/45] Added category view --- pages/Keywords.md | 96 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 86 insertions(+), 10 deletions(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index 5c4ec0bfc..780989f91 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -11,7 +11,6 @@ Keyword | Category | Description / links `await` | Asynchronous functions | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) `boolean` | Type annotation | [`boolean` type](Basic%20Types.md#boolean) `break` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/break) -`case` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) `continue` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/continue) `class` | Classes | [Class definition](Classes.md) `const` | Variable declaration | [`const` declaration](Variable%20Declarations.md#const-declarations) @@ -20,7 +19,7 @@ Keyword | Category | Description / links `debugger` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) `declare` | Environment/modules | [Ambient declarations](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#12-ambients) `default` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/default) -`default` | Enivronment/modules | [Default exports](Modules.md#default-exports) +`default` | Environment/modules | [Default exports](Modules.md#default-exports) `delete` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) `do`...`while` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/do...while) `enum` | User-defined type | [Defines a set of named values](Enums.md) @@ -30,15 +29,16 @@ Keyword | Category | Description / links `for` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for) `for`...`in` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in) `for`...`of` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) -`from "`_path_`"` | Enivronment/modules | [Location of imported module](Modules.md#import) +`from "`_path_`"` | Environment/modules | [Location of imported module](Modules.md#import) `get` | Classes | [Getters](Classes.md#accessors) `function` | Functions | [Function declaration](Functions.md#functions) `if`...`else` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) _class_ `implements` _interface_ | User-defined-type modifier | [Class must match the shape of the interface](Interfaces.md#implementing-an-interface) `import` | Environment/modules | [Enable access to exported elements in a module](Modules.md#import) `import` _symbol_ | Environment/modules | [Synbol aliases](Namespaces.md#aliases) -`instanceof` | Type operations | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof) +`instanceof` | Type operation | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof) `interface` | User-defined type | [Defines a type by its shape (structural typing)](Interfaces.md) +_parameter_ `is` _type_ | [User-defined type guards](Advanced%20Types.md#user-defined-type-guards) `let` | Variable declaration | [`let` declaration](Variable%20Declarations.md#let-declarations) `module` | Environment/modules | [Define an ambient module](Modules.md#ambient-modules) `namespace` | Environment/modules | [Associates the contained elements with the specified namespace](Namespaces.md) @@ -56,20 +56,96 @@ _class_ `implements` _interface_ | User-defined-type modifier | [Class must matc `static` | Classes | [Static properties](Classes.md#static-properties) `string` | Type annotation | [`string` type](Basic%20Types.md#string) `super` | Classes | Reference to properties / constructor of the base class [(spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#49-the-super-keyword) -`switch` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) +`switch...case` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) `symbol` | Type annotation | [Symbol type](Symbols.md) -`this` | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) +`this` | Functions | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) `this` | Type annotation | [Polymorphic `this` types in class/interface](Advanced%20Types.md#polymorphic-this-types) -`function` [_name_]`(this: ` _annotation_) | | [`this` parameter](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#specifying-the-type-of-this-for-functions) -`this is` _T_ | | [User-defined type guards](Advanced%20Types.md#user-defined-type-guards) +`function` [_name_]`(this: ` _annotation_) | Functions | [`this` parameter](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#specifying-the-type-of-this-for-functions) +`this is` _T_ | Classes | [`this`-based type guards](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#this-based-type-guards) `true` | Literal | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) `try`...`catch`...`finally` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) `type` | User-defined type | [Type alias](Advanced%20Types.md#type-aliases) -`typeof` | Type operations | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) +`typeof` | Type operation | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) `undefined` | Literal | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined) `undefined` | Type annotation | [`undefined` type](Basic%20Types.md#null-and-undefined) `var` | Variable declaration | [`var` declaration](Variable%20Declarations.md#var-declarations) -`void` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void) +`void` | Literal | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void) `void` | Type annotation | [`void` type](Basic%20Types.md#void) `while` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while) `yield` | Generator functions | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) + +--- + +### By category + +Category | Keyword | Description +---|---|--- +Literal | `false` | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) +Literal | `null` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null) +Literal | `true` | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) +Literal | `undefined` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined) +Literal | `void` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void) +Variable declaration | `const` | [`const` declaration](Variable%20Declarations.md#const-declarations) +Variable declaration | `let` | [`let` declaration](Variable%20Declarations.md#let-declarations) +Variable declaration | `var` | [`var` declaration](Variable%20Declarations.md#var-declarations) +Control flow | `break` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/break) +Control flow | `continue` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/continue) +Control flow | `default` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/default) +Control flow | `do`...`while` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/do...while) +Control flow | `for` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for) +Control flow | `for`...`in` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in) +Control flow | `for`...`of` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) +Control flow | `if`...`else` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) +Control flow | `switch...case` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) +Control flow | `try`...`catch`...`finally` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) +Control flow | `while` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while) +Functions | `function` | [Function declaration](Functions.md#functions) +Functions | `function` [_name_]`(this: ` _annotation_) | [`this` parameter](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#specifying-the-type-of-this-for-functions) +Functions | `return` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return) +Functions | `this` | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) +Generator functions | `yield` | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) +Asynchronous functions | `async` | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) +Asynchronous functions | `await` | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) +Type annotation | `any` | [Describes a type unknown at design time](Basic%20Types.md#any) +Type annotation | `boolean` | [`boolean` type](Basic%20Types.md#boolean) +Type annotation | `never` | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) +Type annotation | `null` | [`null` type](Basic%20Types.md#null-and-undefined) +Type annotation | `number` | [`number` type](Basic%20Types.md#number) +Type annotation | `string` | [`string` type](Basic%20Types.md#string) +Type annotation | `symbol` | [Symbol type](Symbols.md) +Type annotation | `this` | [Polymorphic `this` types in class/interface](Advanced%20Types.md#polymorphic-this-types) +Type annotation | `undefined` | [`undefined` type](Basic%20Types.md#null-and-undefined) +Type annotation | `void` | [`void` type](Basic%20Types.md#void) +Type operation | `as` | [Type assertion](Basic%20Types.md#type-assertions) +Type operation | `instanceof` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof) +Type operation | `typeof` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) +Environment/modules | `as` | [Module import renaming](Modules.md#import) +Environment/modules | `declare` | [Ambient declarations](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#12-ambients) +Environment/modules | `default` | [Default exports](Modules.md#default-exports) +Environment/modules | `export` | [Allow access to module elements outside the module](Modules.md#export) +Environment/modules | `from "`_path_`"` | [Location of imported module](Modules.md#import) +Environment/modules | `import` | [Enable access to exported elements in a module](Modules.md#import) +Environment/modules | `import` _symbol_ | [Synbol aliases](Namespaces.md#aliases) +Environment/modules | `module` | [Define an ambient module](Modules.md#ambient-modules) +Environment/modules | `namespace` | [Associates the contained elements with the specified namespace](Namespaces.md) +Environment/modules | `require` | [Import the custom object defined in a module with `export =`](Modules.md#export--and-import--require) +User-defined type | `enum` | [Defines a set of named values](Enums.md) +User-defined type | `interface` | [Defines a type by its shape (structural typing)](Interfaces.md) +User-defined type | `type` | [Type alias](Advanced%20Types.md#type-aliases) +User-defined-type modifier | `const enum` | [Forces a const enum](Enums.md) +User-defined-type modifier | `extends` | [Inheritance](Classes.md#inheritance) +Classes | `abstract class` | [Abstract classes (cannot be instantiated; must be inherited)](Classes.md#abstract-classes) +Classes | `abstract` _method_ | [Inheriting classes must implement this method](Classes.md#abstract-classes) +Classes | `class` | [Class definition](Classes.md) +Classes | `constructor` | [Constructor functions](Classes.md#constructor-functions) +Classes | `get` | [Getters](Classes.md#accessors) +Classes | `set` | [Setters](Classes.md#accessors) +Classes | `static` | [Static properties](Classes.md#static-properties) +Classes | `super` | Reference to properties / constructor of the base class [(spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#49-the-super-keyword) +Classes | `this is` _T_ | [`this`-based type guards](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#this-based-type-guards) +Accessibility modifier | `private` | [Property can be used only from its containing class](Classes.md#understanding-private) +Accessibility modifier | `protected` | [Property can only be used in its containing class, or by classes which inherit from the containing class](Classes.md#understanding-protected) +Accessibility modifier | `public` | [Property can be used from outside its containing class](Classes.md#public-by-default) +Member modifier | `readonly` | [Property's value can be read, but not written to](Classes.md#readonly-modifier) +Other | `debugger` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) +Other | `delete` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) \ No newline at end of file From d17b9cf06e5d16c845fe8f86e5249cb71b7abc36 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Tue, 19 Jul 2016 12:45:31 +0300 Subject: [PATCH 22/45] Category link test --- pages/Keywords.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index 780989f91..d029d0ccc 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -25,7 +25,7 @@ Keyword | Category | Description / links `enum` | User-defined type | [Defines a set of named values](Enums.md) `export` | Environment/modules | [Allow access to module elements outside the module](Modules.md#export) `extends` | User-defined-type modifier | [Inheritance](Classes.md#inheritance) -`false` | Literal | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) +`false` | [Literal](#literal) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) `for` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for) `for`...`in` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in) `for`...`of` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) @@ -80,7 +80,7 @@ _parameter_ `is` _type_ | [User-defined type guards](Advanced%20Types.md#user-de Category | Keyword | Description ---|---|--- -Literal | `false` | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) +Literal | `false` | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) Literal | `null` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null) Literal | `true` | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) Literal | `undefined` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined) @@ -148,4 +148,4 @@ Accessibility modifier | `protected` | [Property can only be used in its contain Accessibility modifier | `public` | [Property can be used from outside its containing class](Classes.md#public-by-default) Member modifier | `readonly` | [Property's value can be read, but not written to](Classes.md#readonly-modifier) Other | `debugger` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) -Other | `delete` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) \ No newline at end of file +Other | `delete` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) From 10ddd2df23476ebaba560183ae29c77f30fdcdca Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Tue, 19 Jul 2016 12:47:41 +0300 Subject: [PATCH 23/45] Link test --- pages/Keywords.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index d029d0ccc..f567c3c1e 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -80,7 +80,7 @@ _parameter_ `is` _type_ | [User-defined type guards](Advanced%20Types.md#user-de Category | Keyword | Description ---|---|--- -Literal | `false` | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) +
Literal
| `false` | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) Literal | `null` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null) Literal | `true` | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) Literal | `undefined` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined) From 3bc3d30485ed1c5af2130f41bcdf0f07bc81f581 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Tue, 19 Jul 2016 15:41:25 +0200 Subject: [PATCH 24/45] Added links to category view --- pages/Keywords.md | 163 +++++++++++++++++++++++----------------------- 1 file changed, 82 insertions(+), 81 deletions(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index f567c3c1e..49523998c 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -2,77 +2,77 @@ Keyword | Category | Description / links ---|---|--- -`abstract class` | Classes | [Abstract classes (cannot be instantiated; must be inherited)](Classes.md#abstract-classes) -`abstract` _method_ | Classes | [Inheriting classes must implement this method](Classes.md#abstract-classes) -`any` | Type annotation | [Describes a type unknown at design time](Basic%20Types.md#any) -`as` | Type operation | [Type assertion](Basic%20Types.md#type-assertions) -`as` | Environment/modules | [Module import renaming](Modules.md#import) -`async` | Asynchronous functions | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) -`await` | Asynchronous functions | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) -`boolean` | Type annotation | [`boolean` type](Basic%20Types.md#boolean) -`break` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/break) -`continue` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/continue) -`class` | Classes | [Class definition](Classes.md) -`const` | Variable declaration | [`const` declaration](Variable%20Declarations.md#const-declarations) -`const enum` | User-defined-type modifier | [Forces a const enum](Enums.md) -`constructor` | Classes | [Constructor functions](Classes.md#constructor-functions) +`abstract class` | [Classes](#classes) | [Abstract classes (cannot be instantiated; must be inherited)](Classes.md#abstract-classes) +`abstract` _method_ | [Classes](#classes) | [Inheriting classes must implement this method](Classes.md#abstract-classes) +`any` | [Type annotation](#type-annotation) | [Describes a type unknown at design time](Basic%20Types.md#any) +`as` | [Type operation](#type-operation) | [Type assertion](Basic%20Types.md#type-assertions) +`as` | [Environment/modules](#environment-modules) | [Module import renaming](Modules.md#import) +`async` | [Asynchronous functions](#asynchronous-functions) | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) +`await` | [Asynchronous functions](#asynchronous-functions) | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) +`boolean` | [Type annotation](#type-annotation) | [`boolean` type](Basic%20Types.md#boolean) +`break` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/break) +`continue` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/continue) +`class` | [Classes](#classes) | [Class definition](Classes.md) +`const` | [Variable declaration](#variable-declaration) | [`const` declaration](Variable%20Declarations.md#const-declarations) +`const enum` | [User-defined-type modifier](#user-defined-type-modifier) | [Forces a const enum](Enums.md) +`constructor` | [Classes](#classes) | [Constructor functions](Classes.md#constructor-functions) `debugger` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) -`declare` | Environment/modules | [Ambient declarations](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#12-ambients) -`default` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/default) -`default` | Environment/modules | [Default exports](Modules.md#default-exports) +`declare` | [Environment/modules](#environment-modules) | [Ambient declarations](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#12-ambients) +`default` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/default) +`default` | [Environment/modules](#environment-modules) | [Default exports](Modules.md#default-exports) `delete` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) -`do`...`while` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/do...while) -`enum` | User-defined type | [Defines a set of named values](Enums.md) -`export` | Environment/modules | [Allow access to module elements outside the module](Modules.md#export) -`extends` | User-defined-type modifier | [Inheritance](Classes.md#inheritance) +`do`...`while` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/do...while) +`enum` | [User-defined type](#user-defined-type) | [Defines a set of named values](Enums.md) +`export` | [Environment/modules](#environment-modules) | [Allow access to module elements outside the module](Modules.md#export) +`extends` | [User-defined-type modifier](#user-defined-type-modifier) | [Inheritance](Classes.md#inheritance) `false` | [Literal](#literal) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) -`for` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for) -`for`...`in` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in) -`for`...`of` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) -`from "`_path_`"` | Environment/modules | [Location of imported module](Modules.md#import) -`get` | Classes | [Getters](Classes.md#accessors) -`function` | Functions | [Function declaration](Functions.md#functions) -`if`...`else` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) -_class_ `implements` _interface_ | User-defined-type modifier | [Class must match the shape of the interface](Interfaces.md#implementing-an-interface) -`import` | Environment/modules | [Enable access to exported elements in a module](Modules.md#import) -`import` _symbol_ | Environment/modules | [Synbol aliases](Namespaces.md#aliases) -`instanceof` | Type operation | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof) -`interface` | User-defined type | [Defines a type by its shape (structural typing)](Interfaces.md) +`for` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for) +`for`...`in` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in) +`for`...`of` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) +`from "`_path_`"` | [Environment/modules](#environment-modules) | [Location of imported module](Modules.md#import) +`get` | [Classes](#classes) | [Getters](Classes.md#accessors) +`function` | [Functions](#functions) | [Function declaration](Functions.md#functions) +`if`...`else` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) +_class_ `implements` _interface_ | [User-defined-type modifier](#user-defined-type-modifier) | [Class must match the shape of the interface](Interfaces.md#implementing-an-interface) +`import` | [Environment/modules](#environment-modules) | [Enable access to exported elements in a module](Modules.md#import) +`import` _symbol_ | [Environment/modules](#environment-modules) | [Synbol aliases](Namespaces.md#aliases) +`instanceof` | [Type operation](#type-operation) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof) +`interface` | [User-defined type](#user-defined-type) | [Defines a type by its shape (structural typing)](Interfaces.md) _parameter_ `is` _type_ | [User-defined type guards](Advanced%20Types.md#user-defined-type-guards) -`let` | Variable declaration | [`let` declaration](Variable%20Declarations.md#let-declarations) -`module` | Environment/modules | [Define an ambient module](Modules.md#ambient-modules) -`namespace` | Environment/modules | [Associates the contained elements with the specified namespace](Namespaces.md) -`never` | Type annotation | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) -`null` | Literal | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null) -`null` | Type annotation | [`null` type](Basic%20Types.md#null-and-undefined) -`number` | Type annotation | [`number` type](Basic%20Types.md#number) -`private` | Accessibility modifier | [Property can be used only from its containing class](Classes.md#understanding-private) -`protected` | Accessibility modifier | [Property can only be used in its containing class, or by classes which inherit from the containing class](Classes.md#understanding-protected) -`public` | Accessibility modifier | [Property can be used from outside its containing class](Classes.md#public-by-default) -`readonly` | Member modifier | [Property's value can be read, but not written to](Classes.md#readonly-modifier) -`require` | Environment/modules | [Import the custom object defined in a module with `export =`](Modules.md#export--and-import--require) -`return` | Functions | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return) -`set` | Classes | [Setters](Classes.md#accessors) -`static` | Classes | [Static properties](Classes.md#static-properties) -`string` | Type annotation | [`string` type](Basic%20Types.md#string) -`super` | Classes | Reference to properties / constructor of the base class [(spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#49-the-super-keyword) -`switch...case` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) -`symbol` | Type annotation | [Symbol type](Symbols.md) -`this` | Functions | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) -`this` | Type annotation | [Polymorphic `this` types in class/interface](Advanced%20Types.md#polymorphic-this-types) -`function` [_name_]`(this: ` _annotation_) | Functions | [`this` parameter](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#specifying-the-type-of-this-for-functions) -`this is` _T_ | Classes | [`this`-based type guards](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#this-based-type-guards) -`true` | Literal | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) -`try`...`catch`...`finally` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) -`type` | User-defined type | [Type alias](Advanced%20Types.md#type-aliases) -`typeof` | Type operation | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) -`undefined` | Literal | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined) -`undefined` | Type annotation | [`undefined` type](Basic%20Types.md#null-and-undefined) -`var` | Variable declaration | [`var` declaration](Variable%20Declarations.md#var-declarations) -`void` | Literal | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void) -`void` | Type annotation | [`void` type](Basic%20Types.md#void) -`while` | Control flow | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while) -`yield` | Generator functions | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) +`let` | [Variable declaration](#variable-declaration) | [`let` declaration](Variable%20Declarations.md#let-declarations) +`module` | [Environment/modules](#environment-modules) | [Define an ambient module](Modules.md#ambient-modules) +`namespace` | [Environment/modules](#environment-modules) | [Associates the contained elements with the specified namespace](Namespaces.md) +`never` | [Type annotation](#type-annotation) | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) +`null` | [Literal](#literal) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null) +`null` | [Type annotation](#type-annotation) | [`null` type](Basic%20Types.md#null-and-undefined) +`number` | [Type annotation](#type-annotation) | [`number` type](Basic%20Types.md#number) +`private` | [Accessibility modifier](#accessibility-modifier) | [Property can be used only from its containing class](Classes.md#understanding-private) +`protected` | [Accessibility modifier](#accessibility-modifier) | [Property can only be used in its containing class, or by classes which inherit from the containing class](Classes.md#understanding-protected) +`public` | [Accessibility modifier](#accessibility-modifier) | [Property can be used from outside its containing class](Classes.md#public-by-default) +`readonly` | [Member modifier](#member-modifier) | [Property's value can be read, but not written to](Classes.md#readonly-modifier) +`require` | [Environment/modules](#environment-modules) | [Import the custom object defined in a module with `export =`](Modules.md#export--and-import--require) +`return` | [Functions](#functions) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return) +`set` | [Classes](#classes) | [Setters](Classes.md#accessors) +`static` | [Classes](#classes) | [Static properties](Classes.md#static-properties) +`string` | [Type annotation](#type-annotation) | [`string` type](Basic%20Types.md#string) +`super` | [Classes](#classes) | Reference to properties / constructor of the base class [(spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#49-the-super-keyword) +`switch...case` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) +`symbol` | [Type annotation](#type-annotation) | [Symbol type](Symbols.md) +`this` | [Functions](#functions) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) +`this` | [Type annotation](#type-annotation) | [Polymorphic `this` types in class/interface](Advanced%20Types.md#polymorphic-this-types) +`function` [_name_]`(this: ` _annotation_) | [Functions](#functions) | [`this` parameter](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#specifying-the-type-of-this-for-functions) +`this is` _T_ | [Classes](#classes) | [`this`-based type guards](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#this-based-type-guards) +`true` | [Literal](#literal) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) +`try`...`catch`...`finally` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) +`type` | [User-defined type](#user-defined-type) | [Type alias](Advanced%20Types.md#type-aliases) +`typeof` | [Type operation](#type-operation) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) +`undefined` | [Literal](#literal) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined) +`undefined` | [Type annotation](#type-annotation) | [`undefined` type](Basic%20Types.md#null-and-undefined) +`var` | [Variable declaration](#variable-declaration) | [`var` declaration](Variable%20Declarations.md#var-declarations) +`void` | [Literal](#literal) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void) +`void` | [Type annotation](#type-annotation) | [`void` type](Basic%20Types.md#void) +`while` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while) +`yield` | [Generator functions](#generator-functions) | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) --- @@ -80,15 +80,15 @@ _parameter_ `is` _type_ | [User-defined type guards](Advanced%20Types.md#user-de Category | Keyword | Description ---|---|--- -
Literal
| `false` | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) +|
Literal
| `false` | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) Literal | `null` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null) Literal | `true` | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) Literal | `undefined` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined) Literal | `void` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void) -Variable declaration | `const` | [`const` declaration](Variable%20Declarations.md#const-declarations) +|
Variable declaration
| `const` | [`const` declaration](Variable%20Declarations.md#const-declarations) Variable declaration | `let` | [`let` declaration](Variable%20Declarations.md#let-declarations) Variable declaration | `var` | [`var` declaration](Variable%20Declarations.md#var-declarations) -Control flow | `break` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/break) +|
Control flow
| `break` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/break) Control flow | `continue` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/continue) Control flow | `default` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/default) Control flow | `do`...`while` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/do...while) @@ -99,14 +99,14 @@ Control flow | `if`...`else` | [MDN](https://developer.mozilla.org/en-US/docs/We Control flow | `switch...case` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) Control flow | `try`...`catch`...`finally` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) Control flow | `while` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while) -Functions | `function` | [Function declaration](Functions.md#functions) +|
Functions
| `function` | [Function declaration](Functions.md#functions) Functions | `function` [_name_]`(this: ` _annotation_) | [`this` parameter](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#specifying-the-type-of-this-for-functions) Functions | `return` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return) Functions | `this` | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) -Generator functions | `yield` | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) -Asynchronous functions | `async` | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) +|
Generator functions
| `yield` | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) +|
Asynchronous functions
| `async` | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) Asynchronous functions | `await` | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) -Type annotation | `any` | [Describes a type unknown at design time](Basic%20Types.md#any) +|
Type annotation
| `any` | [Describes a type unknown at design time](Basic%20Types.md#any) Type annotation | `boolean` | [`boolean` type](Basic%20Types.md#boolean) Type annotation | `never` | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) Type annotation | `null` | [`null` type](Basic%20Types.md#null-and-undefined) @@ -116,10 +116,10 @@ Type annotation | `symbol` | [Symbol type](Symbols.md) Type annotation | `this` | [Polymorphic `this` types in class/interface](Advanced%20Types.md#polymorphic-this-types) Type annotation | `undefined` | [`undefined` type](Basic%20Types.md#null-and-undefined) Type annotation | `void` | [`void` type](Basic%20Types.md#void) -Type operation | `as` | [Type assertion](Basic%20Types.md#type-assertions) +|
Type operation
| `as` | [Type assertion](Basic%20Types.md#type-assertions) Type operation | `instanceof` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof) Type operation | `typeof` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) -Environment/modules | `as` | [Module import renaming](Modules.md#import) +|
Environment/modules
| `as` | [Module import renaming](Modules.md#import) Environment/modules | `declare` | [Ambient declarations](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#12-ambients) Environment/modules | `default` | [Default exports](Modules.md#default-exports) Environment/modules | `export` | [Allow access to module elements outside the module](Modules.md#export) @@ -129,12 +129,12 @@ Environment/modules | `import` _symbol_ | [Synbol aliases](Namespaces.md#aliases Environment/modules | `module` | [Define an ambient module](Modules.md#ambient-modules) Environment/modules | `namespace` | [Associates the contained elements with the specified namespace](Namespaces.md) Environment/modules | `require` | [Import the custom object defined in a module with `export =`](Modules.md#export--and-import--require) -User-defined type | `enum` | [Defines a set of named values](Enums.md) +|
User-defined type
| `enum` | [Defines a set of named values](Enums.md) User-defined type | `interface` | [Defines a type by its shape (structural typing)](Interfaces.md) User-defined type | `type` | [Type alias](Advanced%20Types.md#type-aliases) -User-defined-type modifier | `const enum` | [Forces a const enum](Enums.md) +|
User-defined-type modifier
| `const enum` | [Forces a const enum](Enums.md) User-defined-type modifier | `extends` | [Inheritance](Classes.md#inheritance) -Classes | `abstract class` | [Abstract classes (cannot be instantiated; must be inherited)](Classes.md#abstract-classes) +|
Classes
| `abstract class` | [Abstract classes (cannot be instantiated; must be inherited)](Classes.md#abstract-classes) Classes | `abstract` _method_ | [Inheriting classes must implement this method](Classes.md#abstract-classes) Classes | `class` | [Class definition](Classes.md) Classes | `constructor` | [Constructor functions](Classes.md#constructor-functions) @@ -143,9 +143,10 @@ Classes | `set` | [Setters](Classes.md#accessors) Classes | `static` | [Static properties](Classes.md#static-properties) Classes | `super` | Reference to properties / constructor of the base class [(spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#49-the-super-keyword) Classes | `this is` _T_ | [`this`-based type guards](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#this-based-type-guards) -Accessibility modifier | `private` | [Property can be used only from its containing class](Classes.md#understanding-private) +|
Accessibility modifier
| `private` | [Property can be used only from its containing class](Classes.md#understanding-private) Accessibility modifier | `protected` | [Property can only be used in its containing class, or by classes which inherit from the containing class](Classes.md#understanding-protected) Accessibility modifier | `public` | [Property can be used from outside its containing class](Classes.md#public-by-default) -Member modifier | `readonly` | [Property's value can be read, but not written to](Classes.md#readonly-modifier) +|
Member modifier
| `readonly` | [Property's value can be read, but not written to](Classes.md#readonly-modifier) Other | `debugger` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) Other | `delete` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) + From 6e4906ed1fc0d128ca791663e3067840377cc7ae Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Tue, 19 Jul 2016 15:46:30 +0200 Subject: [PATCH 25/45] Fix double-blank line --- pages/Keywords.md | 1 - 1 file changed, 1 deletion(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index 49523998c..8a9a5bc78 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -149,4 +149,3 @@ Accessibility modifier | `public` | [Property can be used from outside its conta |
Member modifier
| `readonly` | [Property's value can be read, but not written to](Classes.md#readonly-modifier) Other | `debugger` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) Other | `delete` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) - From 345a6b10f955b5c9cd3dfc07a971373c0960f636 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Tue, 19 Jul 2016 23:20:27 +0200 Subject: [PATCH 26/45] Added `export` for namespaces --- pages/Keywords.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index 8a9a5bc78..5483bf46b 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -23,7 +23,7 @@ Keyword | Category | Description / links `delete` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) `do`...`while` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/do...while) `enum` | [User-defined type](#user-defined-type) | [Defines a set of named values](Enums.md) -`export` | [Environment/modules](#environment-modules) | [Allow access to module elements outside the module](Modules.md#export) +`export` | [Environment/modules](#environment-modules) | Allow access to elements from outside the [module](Modules.md#export) or [namespace](Namespaces.md#namespacing) `extends` | [User-defined-type modifier](#user-defined-type-modifier) | [Inheritance](Classes.md#inheritance) `false` | [Literal](#literal) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) `for` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for) @@ -57,7 +57,7 @@ _parameter_ `is` _type_ | [User-defined type guards](Advanced%20Types.md#user-de `string` | [Type annotation](#type-annotation) | [`string` type](Basic%20Types.md#string) `super` | [Classes](#classes) | Reference to properties / constructor of the base class [(spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#49-the-super-keyword) `switch...case` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) -`symbol` | [Type annotation](#type-annotation) | [Symbol type](Symbols.md) +`symbol` | [Type annotation](#type-annotation) | [`symbol` type](Symbols.md) `this` | [Functions](#functions) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) `this` | [Type annotation](#type-annotation) | [Polymorphic `this` types in class/interface](Advanced%20Types.md#polymorphic-this-types) `function` [_name_]`(this: ` _annotation_) | [Functions](#functions) | [`this` parameter](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#specifying-the-type-of-this-for-functions) @@ -112,7 +112,7 @@ Type annotation | `never` | [`never` type](https://github.com/Microsoft/TypeScri Type annotation | `null` | [`null` type](Basic%20Types.md#null-and-undefined) Type annotation | `number` | [`number` type](Basic%20Types.md#number) Type annotation | `string` | [`string` type](Basic%20Types.md#string) -Type annotation | `symbol` | [Symbol type](Symbols.md) +Type annotation | `symbol` | [`Symbol` type](Symbols.md) Type annotation | `this` | [Polymorphic `this` types in class/interface](Advanced%20Types.md#polymorphic-this-types) Type annotation | `undefined` | [`undefined` type](Basic%20Types.md#null-and-undefined) Type annotation | `void` | [`void` type](Basic%20Types.md#void) @@ -122,7 +122,7 @@ Type operation | `typeof` | [MDN](https://developer.mozilla.org/en-US/docs/Web/J |
Environment/modules
| `as` | [Module import renaming](Modules.md#import) Environment/modules | `declare` | [Ambient declarations](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#12-ambients) Environment/modules | `default` | [Default exports](Modules.md#default-exports) -Environment/modules | `export` | [Allow access to module elements outside the module](Modules.md#export) +Environment/modules | `export` | Allow access to elements from outside the [module](Modules.md#export) or [namespace](Namespaces.md#namespacing) Environment/modules | `from "`_path_`"` | [Location of imported module](Modules.md#import) Environment/modules | `import` | [Enable access to exported elements in a module](Modules.md#import) Environment/modules | `import` _symbol_ | [Synbol aliases](Namespaces.md#aliases) @@ -148,4 +148,4 @@ Accessibility modifier | `protected` | [Property can only be used in its contain Accessibility modifier | `public` | [Property can be used from outside its containing class](Classes.md#public-by-default) |
Member modifier
| `readonly` | [Property's value can be read, but not written to](Classes.md#readonly-modifier) Other | `debugger` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) -Other | `delete` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) +Other | `delete` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) \ No newline at end of file From 35a0bc14189f8a17418a4d2eb6ea5483cf0de0e1 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Wed, 20 Jul 2016 13:08:02 +0200 Subject: [PATCH 27/45] Added `new` and `typeof` type annotation --- pages/Keywords.md | 67 ++++++++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 30 deletions(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index 5483bf46b..4af36357c 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -3,19 +3,19 @@ Keyword | Category | Description / links ---|---|--- `abstract class` | [Classes](#classes) | [Abstract classes (cannot be instantiated; must be inherited)](Classes.md#abstract-classes) -`abstract` _method_ | [Classes](#classes) | [Inheriting classes must implement this method](Classes.md#abstract-classes) -`any` | [Type annotation](#type-annotation) | [Describes a type unknown at design time](Basic%20Types.md#any) +`abstract` _member_ | [Classes](#classes) | [Inheriting classes must implement this method](Classes.md#abstract-classes) +`any` | [Predefined type](#predefined-type) | [Describes a type unknown at design time](Basic%20Types.md#any) `as` | [Type operation](#type-operation) | [Type assertion](Basic%20Types.md#type-assertions) `as` | [Environment/modules](#environment-modules) | [Module import renaming](Modules.md#import) `async` | [Asynchronous functions](#asynchronous-functions) | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) `await` | [Asynchronous functions](#asynchronous-functions) | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) -`boolean` | [Type annotation](#type-annotation) | [`boolean` type](Basic%20Types.md#boolean) +`boolean` | [Predefined type](#predefined-type) | [`boolean` type](Basic%20Types.md#boolean) `break` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/break) `continue` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/continue) `class` | [Classes](#classes) | [Class definition](Classes.md) `const` | [Variable declaration](#variable-declaration) | [`const` declaration](Variable%20Declarations.md#const-declarations) `const enum` | [User-defined-type modifier](#user-defined-type-modifier) | [Forces a const enum](Enums.md) -`constructor` | [Classes](#classes) | [Constructor functions](Classes.md#constructor-functions) +`constructor` | [Classes](#classes) | [Constructor functions](Classes.md#constructor-function) `debugger` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) `declare` | [Environment/modules](#environment-modules) | [Ambient declarations](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#12-ambients) `default` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/default) @@ -30,7 +30,7 @@ Keyword | Category | Description / links `for`...`in` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in) `for`...`of` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) `from "`_path_`"` | [Environment/modules](#environment-modules) | [Location of imported module](Modules.md#import) -`get` | [Classes](#classes) | [Getters](Classes.md#accessors) +`get` | [Classes](#classes) | [Getter](Classes.md#accessors) `function` | [Functions](#functions) | [Function declaration](Functions.md#functions) `if`...`else` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) _class_ `implements` _interface_ | [User-defined-type modifier](#user-defined-type-modifier) | [Class must match the shape of the interface](Interfaces.md#implementing-an-interface) @@ -42,35 +42,38 @@ _parameter_ `is` _type_ | [User-defined type guards](Advanced%20Types.md#user-de `let` | [Variable declaration](#variable-declaration) | [`let` declaration](Variable%20Declarations.md#let-declarations) `module` | [Environment/modules](#environment-modules) | [Define an ambient module](Modules.md#ambient-modules) `namespace` | [Environment/modules](#environment-modules) | [Associates the contained elements with the specified namespace](Namespaces.md) -`never` | [Type annotation](#type-annotation) | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) +`never` | [Predefined type](#predefined-type) | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) +`new` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new) +`new` | [Type annotation](#type-annotation) | Type annotation for constructor function ([spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#389-constructor-type-literals) `null` | [Literal](#literal) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null) -`null` | [Type annotation](#type-annotation) | [`null` type](Basic%20Types.md#null-and-undefined) -`number` | [Type annotation](#type-annotation) | [`number` type](Basic%20Types.md#number) +`null` | [Predefined type](#predefined-type) | [`null` type](Basic%20Types.md#null-and-undefined) +`number` | [Predefined type](#predefined-type) | [`number` type](Basic%20Types.md#number) `private` | [Accessibility modifier](#accessibility-modifier) | [Property can be used only from its containing class](Classes.md#understanding-private) `protected` | [Accessibility modifier](#accessibility-modifier) | [Property can only be used in its containing class, or by classes which inherit from the containing class](Classes.md#understanding-protected) `public` | [Accessibility modifier](#accessibility-modifier) | [Property can be used from outside its containing class](Classes.md#public-by-default) `readonly` | [Member modifier](#member-modifier) | [Property's value can be read, but not written to](Classes.md#readonly-modifier) `require` | [Environment/modules](#environment-modules) | [Import the custom object defined in a module with `export =`](Modules.md#export--and-import--require) `return` | [Functions](#functions) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return) -`set` | [Classes](#classes) | [Setters](Classes.md#accessors) +`set` | [Classes](#classes) | [Setter](Classes.md#accessors) `static` | [Classes](#classes) | [Static properties](Classes.md#static-properties) -`string` | [Type annotation](#type-annotation) | [`string` type](Basic%20Types.md#string) +`string` | [Predefined type](#predefined-type) | [`string` type](Basic%20Types.md#string) `super` | [Classes](#classes) | Reference to properties / constructor of the base class [(spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#49-the-super-keyword) `switch...case` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) -`symbol` | [Type annotation](#type-annotation) | [`symbol` type](Symbols.md) +`symbol` | [Predefined type](#predefined-type) | [`symbol` type](Symbols.md) `this` | [Functions](#functions) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) -`this` | [Type annotation](#type-annotation) | [Polymorphic `this` types in class/interface](Advanced%20Types.md#polymorphic-this-types) +`this` | [Type annotation](#type-annotation) | [Within a class/interface declaration, represents the actual type of an instance of the class/interface](Advanced%20Types.md#polymorphic-this-types) `function` [_name_]`(this: ` _annotation_) | [Functions](#functions) | [`this` parameter](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#specifying-the-type-of-this-for-functions) `this is` _T_ | [Classes](#classes) | [`this`-based type guards](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#this-based-type-guards) `true` | [Literal](#literal) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) `try`...`catch`...`finally` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) `type` | [User-defined type](#user-defined-type) | [Type alias](Advanced%20Types.md#type-aliases) `typeof` | [Type operation](#type-operation) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) +`typeof` | [Type annotation](#type-annotation) | Copies the type of an existing identifier ([spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3810-type-queries) `undefined` | [Literal](#literal) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined) -`undefined` | [Type annotation](#type-annotation) | [`undefined` type](Basic%20Types.md#null-and-undefined) +`undefined` | [Predefined type](#predefined-type) | [`undefined` type](Basic%20Types.md#null-and-undefined) `var` | [Variable declaration](#variable-declaration) | [`var` declaration](Variable%20Declarations.md#var-declarations) `void` | [Literal](#literal) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void) -`void` | [Type annotation](#type-annotation) | [`void` type](Basic%20Types.md#void) +`void` | [Predefined type](#predefined-type) | [`void` type](Basic%20Types.md#void) `while` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while) `yield` | [Generator functions](#generator-functions) | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) @@ -106,16 +109,21 @@ Functions | `this` | [spec](https://github.com/Microsoft/TypeScript/blob/master/ |
Generator functions
| `yield` | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) |
Asynchronous functions
| `async` | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) Asynchronous functions | `await` | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) -|
Type annotation
| `any` | [Describes a type unknown at design time](Basic%20Types.md#any) -Type annotation | `boolean` | [`boolean` type](Basic%20Types.md#boolean) -Type annotation | `never` | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) -Type annotation | `null` | [`null` type](Basic%20Types.md#null-and-undefined) -Type annotation | `number` | [`number` type](Basic%20Types.md#number) -Type annotation | `string` | [`string` type](Basic%20Types.md#string) -Type annotation | `symbol` | [`Symbol` type](Symbols.md) -Type annotation | `this` | [Polymorphic `this` types in class/interface](Advanced%20Types.md#polymorphic-this-types) -Type annotation | `undefined` | [`undefined` type](Basic%20Types.md#null-and-undefined) -Type annotation | `void` | [`void` type](Basic%20Types.md#void) +| | `debugger` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) +| | `delete` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) +| | `new` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new) +|
Predefined type
| `any` | [Describes a type unknown at design time](Basic%20Types.md#any) +Predefined type | `boolean` | [`boolean` type](Basic%20Types.md#boolean) +Predefined type | `never` | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) +Predefined type | `null` | [`null` type](Basic%20Types.md#null-and-undefined) +Predefined type | `number` | [`number` type](Basic%20Types.md#number) +Predefined type | `string` | [`string` type](Basic%20Types.md#string) +Predefined type | `symbol` | [`symbol` type](Symbols.md) +Predefined type | `undefined` | [`undefined` type](Basic%20Types.md#null-and-undefined) +Predefined type | `void` | [`void` type](Basic%20Types.md#void) +|
Type annotation
| `new` | Type annotation for constructor function ([spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#389-constructor-type-literals) +Type annotation | `this` | [Within a class/interface declaration, represents the actual type of an instance of the class/interface](Advanced%20Types.md#polymorphic-this-types) +Type annotation | `typeof` | Copies the type of an existing identifier ([spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3810-type-queries) |
Type operation
| `as` | [Type assertion](Basic%20Types.md#type-assertions) Type operation | `instanceof` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof) Type operation | `typeof` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) @@ -135,11 +143,11 @@ User-defined type | `type` | [Type alias](Advanced%20Types.md#type-aliases) |
User-defined-type modifier
| `const enum` | [Forces a const enum](Enums.md) User-defined-type modifier | `extends` | [Inheritance](Classes.md#inheritance) |
Classes
| `abstract class` | [Abstract classes (cannot be instantiated; must be inherited)](Classes.md#abstract-classes) -Classes | `abstract` _method_ | [Inheriting classes must implement this method](Classes.md#abstract-classes) +Classes | `abstract` _member_ | [Inheriting classes must implement this method](Classes.md#abstract-classes) Classes | `class` | [Class definition](Classes.md) -Classes | `constructor` | [Constructor functions](Classes.md#constructor-functions) -Classes | `get` | [Getters](Classes.md#accessors) -Classes | `set` | [Setters](Classes.md#accessors) +Classes | `constructor` | [Constructor functions](Classes.md#constructor-function) +Classes | `get` | [Getter](Classes.md#accessors) +Classes | `set` | [Setter](Classes.md#accessors) Classes | `static` | [Static properties](Classes.md#static-properties) Classes | `super` | Reference to properties / constructor of the base class [(spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#49-the-super-keyword) Classes | `this is` _T_ | [`this`-based type guards](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#this-based-type-guards) @@ -147,5 +155,4 @@ Classes | `this is` _T_ | [`this`-based type guards](https://github.com/Microsof Accessibility modifier | `protected` | [Property can only be used in its containing class, or by classes which inherit from the containing class](Classes.md#understanding-protected) Accessibility modifier | `public` | [Property can be used from outside its containing class](Classes.md#public-by-default) |
Member modifier
| `readonly` | [Property's value can be read, but not written to](Classes.md#readonly-modifier) -Other | `debugger` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) -Other | `delete` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) \ No newline at end of file + From 1e4b6e5de00d430b1726fad7cde5c5605f8e59cc Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Wed, 20 Jul 2016 13:19:48 +0200 Subject: [PATCH 28/45] Fix for test --- pages/Keywords.md | 1 - 1 file changed, 1 deletion(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index 4af36357c..d6cceb14c 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -155,4 +155,3 @@ Classes | `this is` _T_ | [`this`-based type guards](https://github.com/Microsof Accessibility modifier | `protected` | [Property can only be used in its containing class, or by classes which inherit from the containing class](Classes.md#understanding-protected) Accessibility modifier | `public` | [Property can be used from outside its containing class](Classes.md#public-by-default) |
Member modifier
| `readonly` | [Property's value can be read, but not written to](Classes.md#readonly-modifier) - From 12788c784aab2c13fae3b3f743b15d0d585b628f Mon Sep 17 00:00:00 2001 From: Josh Lubaway Date: Wed, 20 Jul 2016 22:54:29 -0700 Subject: [PATCH 29/45] Add instructions on how to read the handbook. I'm getting started with TypeScript and I was linked to this repository from a few different places. I do not believe the readme is informative enough to newcomers. After some more research it seems that this handbook is meant to be read online, or from the Markdown files directly in this repository. If this is incorrect, I will gladly update the readme, or I would appreciate it if someone more knowledgeable could provide some insight thanks :) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 539e83cfb..7aad899d6 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,6 @@ [![Build Status](https://travis-ci.org/Microsoft/TypeScript-Handbook.svg)](https://travis-ci.org/Microsoft/TypeScript-Handbook) -The TypeScript Handbook is a comprehensive guide to the TypeScript language +The TypeScript Handbook is a comprehensive guide to the TypeScript language. It is meant to be read online at [typescriptlang.org](https://www.typescriptlang.org/docs/handbook/basic-types.html) or [directly from this repository](pages/Basic Types.md). Please see the [latest TypeScript Language Specification](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md) for more details. From 632d8aae6eb17759ed53f5313069132211907ad5 Mon Sep 17 00:00:00 2001 From: Josh Lubaway Date: Wed, 20 Jul 2016 22:58:05 -0700 Subject: [PATCH 30/45] Adhere to one sentence per line style guide. --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7aad899d6..b57f9cfce 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,9 @@ [![Build Status](https://travis-ci.org/Microsoft/TypeScript-Handbook.svg)](https://travis-ci.org/Microsoft/TypeScript-Handbook) -The TypeScript Handbook is a comprehensive guide to the TypeScript language. It is meant to be read online at [typescriptlang.org](https://www.typescriptlang.org/docs/handbook/basic-types.html) or [directly from this repository](pages/Basic Types.md). +The TypeScript Handbook is a comprehensive guide to the TypeScript language. +It is meant to be read online at [typescriptlang.org][1] or [directly from this repository](pages/Basic Types.md). Please see the [latest TypeScript Language Specification](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md) for more details. + +[1]: https://www.typescriptlang.org/docs/handbook/basic-types.html From 4826c50f27a11eb8335126a74ba96cd356ce17bf Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 21 Jul 2016 12:21:13 -0700 Subject: [PATCH 31/45] Update README.md --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b57f9cfce..f938c9662 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,6 @@ [![Build Status](https://travis-ci.org/Microsoft/TypeScript-Handbook.svg)](https://travis-ci.org/Microsoft/TypeScript-Handbook) The TypeScript Handbook is a comprehensive guide to the TypeScript language. -It is meant to be read online at [typescriptlang.org][1] or [directly from this repository](pages/Basic Types.md). +It is meant to be read online at [the TypeScript website](https://www.typescriptlang.org/docs/handbook/basic-types.html) or [directly from this repository](./pages/Basic Types.md). -Please see the [latest TypeScript Language Specification](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md) for more details. - -[1]: https://www.typescriptlang.org/docs/handbook/basic-types.html +For a more formal description of the language, see the [latest TypeScript Language Specification](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md). From d654783d0b7ef8ecf49d0f2f2bd20cd97490c0f7 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Sat, 23 Jul 2016 22:46:12 -0700 Subject: [PATCH 32/45] Remove uses of `null` as default value for flags --- pages/Compiler Options.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pages/Compiler Options.md b/pages/Compiler Options.md index a067dace7..74e048f4c 100644 --- a/pages/Compiler Options.md +++ b/pages/Compiler Options.md @@ -9,7 +9,7 @@ Option | Type | Default `--baseUrl` | `string` | | Base directory to resolve non-relative module names. See [Module Resolution documentation](./Module Resolution.md#base-url) for more details. `--charset` | `string` | `"utf8"` | The character set of the input files. `--declaration`
`-d` | `boolean` | `false` | Generates corresponding '.d.ts' file. -`--declarationDir` | `string` | `null` | Output directory for generated declaration files. +`--declarationDir` | `string` | | Output directory for generated declaration files. `--diagnostics` | `boolean` | `false` | Show diagnostic information. `--disableSizeLimit` | `boolean` | `false` | Disable size limitation on JavaScript project. `--emitBOM` | `boolean` | `false` | Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. @@ -26,7 +26,7 @@ Option | Type | Default `--listEmittedFiles` | `boolean` | `false` | Print names of generated files part of the compilation. `--listFiles` | `boolean` | `false` | Print names of files part of the compilation. `--locale` | `string` | *(platform specific)* | The locale to use to show error messages, e.g. en-us. -`--mapRoot` | `string` | `null` | Specifies the location where debugger should locate map files instead of generated locations. Use this flag if the .map files will be located at run-time in a different location than the .js files. The location specified will be embedded in the sourceMap to direct the debugger where the map files will be located. +`--mapRoot` | `string` | | Specifies the location where debugger should locate map files instead of generated locations. Use this flag if the .map files will be located at run-time in a different location than the .js files. The location specified will be embedded in the sourceMap to direct the debugger where the map files will be located. `--module`
`-m` | `string` | `(target === 'ES6' ? 'ES6' : 'commonjs')` | Specify module code generation: `'none'`, `'commonjs'`, `'amd'`, `'system'`, `'umd'`, `'es6'`, or `'es2015'`.
► Only `'amd'` and `'system'` can be used in conjunction with `--outFile`.
► `'es6'` and `'es2015'` values may not be used when targeting ES5 or lower. `--moduleResolution` | `string` | `(module === 'amd' | 'system' | 'ES6' ? 'classic' : 'node')` | Determine how modules get resolved. Either `'node'` for Node.js/io.js style resolution, or `'classic'` (default). See [Module Resolution documentation](Module Resolution.md) for more details. `--newLine` | `string` | *(platform specific)* | Use the specified end of line sequence to be used when emitting files: `'crlf'` (windows) or `'lf'` (unix)." @@ -42,13 +42,13 @@ Option | Type | Default `--noResolve` | `boolean` | `false` | Do not add triple-slash references or module import targets to the list of compiled files. `--noUnusedLocals` | `boolean` | `false` | Report errors on unused locals. `--noUnusedParameters` | `boolean` | `false` | Report errors on unused parameters. -~~`--out`~~ | `string` | `null` | DEPRECATED. Use `--outFile` instead. -`--outDir` | `string` | `null` | Redirect output structure to the directory. -`--outFile` | `string` | `null` | Concatenate and emit output to single file. The order of concatenation is determined by the list of files passed to the compiler on the command line along with triple-slash references and imports. See output file order documentation for more details. +~~`--out`~~ | `string` | | DEPRECATED. Use `--outFile` instead. +`--outDir` | `string` | | Redirect output structure to the directory. +`--outFile` | `string` | | Concatenate and emit output to single file. The order of concatenation is determined by the list of files passed to the compiler on the command line along with triple-slash references and imports. See output file order documentation for more details. `paths`[2] | `Object` | | List of path mapping entries for module names to locations relative to the `baseUrl`. See [Module Resolution documentation](./Module Resolution.md#path-mapping) for more details. `--preserveConstEnums` | `boolean` | `false` | Do not erase const enum declarations in generated code. See [const enums documentation](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#94-constant-enum-declarations) for more details. `--pretty`[1] | `boolean` | `false` | Stylize errors and messages using color and context. -`--project`
`-p` | `string` | `null` | Compile a project given a valid configuration file.
The argument can be an file path to a valid JSON configuration file, or a directory path to a directory containing a `tsconfig.json` file.
See [tsconfig.json](./tsconfig.json.md) documentation for more details. +`--project`
`-p` | `string` | | Compile a project given a valid configuration file.
The argument can be an file path to a valid JSON configuration file, or a directory path to a directory containing a `tsconfig.json` file.
See [tsconfig.json](./tsconfig.json.md) documentation for more details. `--reactNamespace` | `string` | `"React"` | Specifies the object invoked for `createElement` and `__spread` when targeting 'react' JSX emit. `--removeComments` | `boolean` | `false` | Remove all comments except copy-right header comments beginning with `/*!` `--rootDir` | `string` | *(common root directory is computed from the list of input files)* | Specifies the root directory of input files. Only use to control the output directory structure with `--outDir`. @@ -56,7 +56,7 @@ Option | Type | Default `--skipLibCheck` | `boolean` | `false` | Don't check a the default library (`lib.d.ts`) file's valitidy. `--skipDefaultLibCheck` | `boolean` | `false` | Don't check a user-defined default library (`*.d.ts`) file's valitidy. `--sourceMap` | `boolean` | `false` | Generates corresponding '.map' file. -`--sourceRoot` | `string` | `null` | Specifies the location where debugger should locate TypeScript files instead of source locations. Use this flag if the sources will be located at run-time in a different location than that at design-time. The location specified will be embedded in the sourceMap to direct the debugger where the source files will be located. +`--sourceRoot` | `string` | | Specifies the location where debugger should locate TypeScript files instead of source locations. Use this flag if the sources will be located at run-time in a different location than that at design-time. The location specified will be embedded in the sourceMap to direct the debugger where the source files will be located. `--strictNullChecks` | `boolean` | `false` | In strict null checking mode, the `null` and `undefined` values are not in the domain of every type and are only assignable to themselves and `any` (the one exception being that `undefined` is also assignable to `void`). `--stripInternal`[1] | `boolean` | `false` | Do not emit declarations for code that has an `/** @internal */` JSDoc annotation. `--suppressExcessPropertyErrors` | `boolean` | `false` | Suppress excess property checks for object literals. From 6e834cd848bb25f2386ef6f68380f8984e091e4b Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 25 Jul 2016 10:02:43 -0700 Subject: [PATCH 33/45] Make default more explicit. --- pages/Compiler Options.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/Compiler Options.md b/pages/Compiler Options.md index 74e048f4c..7ff79f278 100644 --- a/pages/Compiler Options.md +++ b/pages/Compiler Options.md @@ -3,7 +3,7 @@ Option | Type | Default | Description -----------------------------------------------|-----------|--------------------------------|---------------------------------------------------------------------- `--allowJs` | `boolean` | `true` | Allow JavaScript files to be compiled. -`--allowSyntheticDefaultImports` | `boolean` | `(module === "system")` | Allow default imports from modules with no default export. This does not affect code emit, just typechecking. +`--allowSyntheticDefaultImports` | `boolean` | `module === "system"` | Allow default imports from modules with no default export. This does not affect code emit, just typechecking. `--allowUnreachableCode` | `boolean` | `false` | Do not report errors on unreachable code. `--allowUnusedLabels` | `boolean` | `false` | Do not report errors on unused labels. `--baseUrl` | `string` | | Base directory to resolve non-relative module names. See [Module Resolution documentation](./Module Resolution.md#base-url) for more details. @@ -27,8 +27,8 @@ Option | Type | Default `--listFiles` | `boolean` | `false` | Print names of files part of the compilation. `--locale` | `string` | *(platform specific)* | The locale to use to show error messages, e.g. en-us. `--mapRoot` | `string` | | Specifies the location where debugger should locate map files instead of generated locations. Use this flag if the .map files will be located at run-time in a different location than the .js files. The location specified will be embedded in the sourceMap to direct the debugger where the map files will be located. -`--module`
`-m` | `string` | `(target === 'ES6' ? 'ES6' : 'commonjs')` | Specify module code generation: `'none'`, `'commonjs'`, `'amd'`, `'system'`, `'umd'`, `'es6'`, or `'es2015'`.
► Only `'amd'` and `'system'` can be used in conjunction with `--outFile`.
► `'es6'` and `'es2015'` values may not be used when targeting ES5 or lower. -`--moduleResolution` | `string` | `(module === 'amd' | 'system' | 'ES6' ? 'classic' : 'node')` | Determine how modules get resolved. Either `'node'` for Node.js/io.js style resolution, or `'classic'` (default). See [Module Resolution documentation](Module Resolution.md) for more details. +`--module`
`-m` | `string` | `target === 'ES6' ? 'ES6' : 'commonjs'` | Specify module code generation: `'none'`, `'commonjs'`, `'amd'`, `'system'`, `'umd'`, `'es6'`, or `'es2015'`.
► Only `'amd'` and `'system'` can be used in conjunction with `--outFile`.
► `'es6'` and `'es2015'` values may not be used when targeting ES5 or lower. +`--moduleResolution` | `string` | `module === 'amd' | 'system' | 'ES6' ? 'classic' : 'node'` | Determine how modules get resolved. Either `'node'` for Node.js/io.js style resolution, or `'classic'`. See [Module Resolution documentation](./Module Resolution.md) for more details. `--newLine` | `string` | *(platform specific)* | Use the specified end of line sequence to be used when emitting files: `'crlf'` (windows) or `'lf'` (unix)." `--noEmit` | `boolean` | `false` | Do not emit outputs. `--noEmitHelpers` | `boolean` | `false` | Do not generate custom helper functions like `__extends` in compiled output. From 8550e42f2ea5567d5ac2eed21fe0657357e54531 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 1 Aug 2016 04:38:09 +0200 Subject: [PATCH 34/45] Separate external links column; property descriptor keywords --- pages/Keywords.md | 314 ++++++++++++++++++++++++---------------------- 1 file changed, 164 insertions(+), 150 deletions(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index d6cceb14c..04037773c 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -1,157 +1,171 @@ # Keywords -Keyword | Category | Description / links ----|---|--- -`abstract class` | [Classes](#classes) | [Abstract classes (cannot be instantiated; must be inherited)](Classes.md#abstract-classes) -`abstract` _member_ | [Classes](#classes) | [Inheriting classes must implement this method](Classes.md#abstract-classes) -`any` | [Predefined type](#predefined-type) | [Describes a type unknown at design time](Basic%20Types.md#any) -`as` | [Type operation](#type-operation) | [Type assertion](Basic%20Types.md#type-assertions) -`as` | [Environment/modules](#environment-modules) | [Module import renaming](Modules.md#import) -`async` | [Asynchronous functions](#asynchronous-functions) | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) -`await` | [Asynchronous functions](#asynchronous-functions) | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) -`boolean` | [Predefined type](#predefined-type) | [`boolean` type](Basic%20Types.md#boolean) -`break` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/break) -`continue` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/continue) -`class` | [Classes](#classes) | [Class definition](Classes.md) -`const` | [Variable declaration](#variable-declaration) | [`const` declaration](Variable%20Declarations.md#const-declarations) -`const enum` | [User-defined-type modifier](#user-defined-type-modifier) | [Forces a const enum](Enums.md) -`constructor` | [Classes](#classes) | [Constructor functions](Classes.md#constructor-function) -`debugger` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) -`declare` | [Environment/modules](#environment-modules) | [Ambient declarations](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#12-ambients) -`default` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/default) -`default` | [Environment/modules](#environment-modules) | [Default exports](Modules.md#default-exports) -`delete` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) -`do`...`while` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/do...while) -`enum` | [User-defined type](#user-defined-type) | [Defines a set of named values](Enums.md) -`export` | [Environment/modules](#environment-modules) | Allow access to elements from outside the [module](Modules.md#export) or [namespace](Namespaces.md#namespacing) -`extends` | [User-defined-type modifier](#user-defined-type-modifier) | [Inheritance](Classes.md#inheritance) -`false` | [Literal](#literal) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) -`for` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for) -`for`...`in` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in) -`for`...`of` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) -`from "`_path_`"` | [Environment/modules](#environment-modules) | [Location of imported module](Modules.md#import) -`get` | [Classes](#classes) | [Getter](Classes.md#accessors) -`function` | [Functions](#functions) | [Function declaration](Functions.md#functions) -`if`...`else` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) -_class_ `implements` _interface_ | [User-defined-type modifier](#user-defined-type-modifier) | [Class must match the shape of the interface](Interfaces.md#implementing-an-interface) -`import` | [Environment/modules](#environment-modules) | [Enable access to exported elements in a module](Modules.md#import) -`import` _symbol_ | [Environment/modules](#environment-modules) | [Synbol aliases](Namespaces.md#aliases) -`instanceof` | [Type operation](#type-operation) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof) -`interface` | [User-defined type](#user-defined-type) | [Defines a type by its shape (structural typing)](Interfaces.md) -_parameter_ `is` _type_ | [User-defined type guards](Advanced%20Types.md#user-defined-type-guards) -`let` | [Variable declaration](#variable-declaration) | [`let` declaration](Variable%20Declarations.md#let-declarations) -`module` | [Environment/modules](#environment-modules) | [Define an ambient module](Modules.md#ambient-modules) -`namespace` | [Environment/modules](#environment-modules) | [Associates the contained elements with the specified namespace](Namespaces.md) -`never` | [Predefined type](#predefined-type) | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) -`new` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new) -`new` | [Type annotation](#type-annotation) | Type annotation for constructor function ([spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#389-constructor-type-literals) -`null` | [Literal](#literal) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null) -`null` | [Predefined type](#predefined-type) | [`null` type](Basic%20Types.md#null-and-undefined) -`number` | [Predefined type](#predefined-type) | [`number` type](Basic%20Types.md#number) -`private` | [Accessibility modifier](#accessibility-modifier) | [Property can be used only from its containing class](Classes.md#understanding-private) -`protected` | [Accessibility modifier](#accessibility-modifier) | [Property can only be used in its containing class, or by classes which inherit from the containing class](Classes.md#understanding-protected) -`public` | [Accessibility modifier](#accessibility-modifier) | [Property can be used from outside its containing class](Classes.md#public-by-default) -`readonly` | [Member modifier](#member-modifier) | [Property's value can be read, but not written to](Classes.md#readonly-modifier) -`require` | [Environment/modules](#environment-modules) | [Import the custom object defined in a module with `export =`](Modules.md#export--and-import--require) -`return` | [Functions](#functions) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return) -`set` | [Classes](#classes) | [Setter](Classes.md#accessors) -`static` | [Classes](#classes) | [Static properties](Classes.md#static-properties) -`string` | [Predefined type](#predefined-type) | [`string` type](Basic%20Types.md#string) -`super` | [Classes](#classes) | Reference to properties / constructor of the base class [(spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#49-the-super-keyword) -`switch...case` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) -`symbol` | [Predefined type](#predefined-type) | [`symbol` type](Symbols.md) -`this` | [Functions](#functions) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) -`this` | [Type annotation](#type-annotation) | [Within a class/interface declaration, represents the actual type of an instance of the class/interface](Advanced%20Types.md#polymorphic-this-types) -`function` [_name_]`(this: ` _annotation_) | [Functions](#functions) | [`this` parameter](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#specifying-the-type-of-this-for-functions) -`this is` _T_ | [Classes](#classes) | [`this`-based type guards](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#this-based-type-guards) -`true` | [Literal](#literal) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) -`try`...`catch`...`finally` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) -`type` | [User-defined type](#user-defined-type) | [Type alias](Advanced%20Types.md#type-aliases) -`typeof` | [Type operation](#type-operation) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) -`typeof` | [Type annotation](#type-annotation) | Copies the type of an existing identifier ([spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3810-type-queries) -`undefined` | [Literal](#literal) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined) -`undefined` | [Predefined type](#predefined-type) | [`undefined` type](Basic%20Types.md#null-and-undefined) -`var` | [Variable declaration](#variable-declaration) | [`var` declaration](Variable%20Declarations.md#var-declarations) -`void` | [Literal](#literal) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void) -`void` | [Predefined type](#predefined-type) | [`void` type](Basic%20Types.md#void) -`while` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while) -`yield` | [Generator functions](#generator-functions) | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) +Keyword | Category | Description | External links +---|---|---|--- +| `abstract class` | [Classes](#classes) | [Abstract classes (cannot be instantiated; must be inherited)](Classes.md#abstract-classes) | | +| `abstract` _member_ | [Classes](#classes) | [Inheriting classes must implement this method/property](Classes.md#abstract-classes) | | +| `any` | [Predefined type](#predefined-type) | [Describes a type unknown at design time](Basic%20Types.md#any) | | +| `as` | [Type operation](#type-operation) | [Type assertion](Basic%20Types.md#type-assertions) | | +| `as` | [Environment/modules](#environment-modules) | [Module import renaming](Modules.md#import) | | +| `async` | [Functions](#functions) | Marks function as asynchronous | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) | +| `await` | [Functions](#functions) | Waits for value within an asynchronous function | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) | +| `boolean` | [Predefined type](#predefined-type) | [`boolean` type](Basic%20Types.md#boolean) | | +| `break` | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/break) | +| `continue` | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/continue) | +| `class` | [Classes](#classes) | [Class declaration/expression](Classes.md) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes) | +| `const` | [Variable declaration](#variable-declaration) | [`const` declaration](Variable%20Declarations.md#const-declarations) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const) | +| `const enum` | [User-defined-type modifier](#user-defined-type-modifier) | [Forces a const enum](Enums.md) | | +| `configurable` | [Property descriptors](#property-descriptors) | Getter | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| `constructor` | [Classes](#classes) | [Constructor functions](Classes.md#constructor-function) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/constructor) | +| `debugger` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) | +| `declare` | [Environment/modules](#environment-modules) | [Ambient declarations](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#12-ambients) | | +| `default` | [Control flow](#control-flow) | Part of `switch...case` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/default) | +| `default` | [Environment/modules](#environment-modules) | [Default exports](Modules.md#default-exports) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export) | +| `delete` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) | +| `do`...`while` | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/do...while) | +| `enum` | [User-defined type](#user-defined-type) | [Defines a set of named values](Enums.md) | | +| `enumerable` | [Property descriptors](#property-descriptors) | Is visible when properties are enumerated | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| `export` | [Environment/modules](#environment-modules) | Allow access to elements from outside the [module](Modules.md#export) or [namespace](Namespaces.md#namespacing) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export) | +| `extends` | [User-defined-type modifier](#user-defined-type-modifier) | [Inheritance](Classes.md#inheritance) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class) | +| `false` | [Literal](#literal) | ([spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type)) | | +| `for` | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for) | +| `for`...`in` | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in) | +| `for`...`of` | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) | +| `from "`_path_`"` | [Environment/modules](#environment-modules) | [Location of imported module](Modules.md#import) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) | +| `function` | [Functions](#functions) | [Function declaration](Functions.md#functions) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function) | +| `get` | [Property descriptors](#property-descriptors) | Getter | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| `get` | [Classes](#classes) | [Getter](Classes.md#accessors) | | +| `if`...`else` | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) | +| _class_ `implements` _interface_ | [User-defined-type modifier](#user-defined-type-modifier) | [Class must match the shape of the interface](Interfaces.md#implementing-an-interface) | | +| `import` | [Environment/modules](#environment-modules) | [Enable access to exported elements in a module](Modules.md#import) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) | +| `import` _symbol_ | [Environment/modules](#environment-modules) | [Synbol aliases](Namespaces.md#aliases) | | +| `instanceof` | [Type operation](#type-operation) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof) | +| `interface` | [User-defined type](#user-defined-type) | [Defines a type by its shape (structural typing)](Interfaces.md) | | +| _parameter_ `is` _type_ | [Type annotation](#type-annotation) | [User-defined type guards](Advanced%20Types.md#user-defined-type-guards) | | +| `let` | [Variable declaration](#variable-declaration) | [`let` declaration](Variable%20Declarations.md#let-declarations) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let) | +| `module` | [Environment/modules](#environment-modules) | [Define an ambient module](Modules.md#ambient-modules) | | +| `namespace` | [Environment/modules](#environment-modules) | [Associates the contained elements with the specified namespace](Namespaces.md) | | +| `never` | [Predefined type](#predefined-type) | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) | | +| `new` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new) | +| `new` | [Type annotation](#type-annotation) | Constructor function type ([spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#389-constructor-type-literals)) | | +| `null` | [Literal](#literal) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null) | +| `null` | [Predefined type](#predefined-type) | [`null` type](Basic%20Types.md#null-and-undefined) | | +| `number` | [Predefined type](#predefined-type) | [`number` type](Basic%20Types.md#number) | | +| `private` | [Accessibility modifier](#accessibility-modifier) | [Property can be used only from its containing class](Classes.md#understanding-private) | | +| `protected` | [Accessibility modifier](#accessibility-modifier) | [Property can only be used in its containing class, or by classes which inherit from the containing class](Classes.md#understanding-protected) | | +| `public` | [Accessibility modifier](#accessibility-modifier) | [Property can be used from outside its containing class](Classes.md#public-by-default) | | +| `readonly` | [Member modifier](#member-modifier) | [Property's value can be read, but not written to](Classes.md#readonly-modifier) | | +| `require` | [Environment/modules](#environment-modules) | [Import the custom object defined in a module with `export =`](Modules.md#export--and-import--require) | | +| `return` | [Functions](#functions) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return) | +| `set` | [Property descriptors](#property-descriptors) | Setter | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| `set` | [Classes](#classes) | [Setter](Classes.md#accessors) | | +| `static` | [Classes](#classes) | [Static properties](Classes.md#static-properties) | | +| `string` | [Predefined type](#predefined-type) | [`string` type](Basic%20Types.md#string) | | +| `super` | [Classes](#classes) | Reference to properties / constructor of the base class [(spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#49-the-super-keyword) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#Super_class_calls_with_super) | +| `switch...case` | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) | +| `symbol` | [Predefined type](#predefined-type) | [`symbol` type](Symbols.md) | | +| `this` | [Functions](#functions) | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) | +| `this` | [Type annotation](#type-annotation) | [Within a class/interface declaration, represents the actual type of an instance of the class/interface](Advanced%20Types.md#polymorphic-this-types) | | +| `(this: ` _annotation_) | [Functions](#functions) | [`this` parameter](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#specifying-the-type-of-this-for-functions) | | +| `this is` _T_ | [Classes](#classes) | [`this`-based type guards](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#this-based-type-guards) | | +| `true` | [Literal](#literal) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) | | +| `try`...`catch`...`finally` | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) | +| `type` | [User-defined type](#user-defined-type) | [Type alias](Advanced%20Types.md#type-aliases) | | +| `typeof` | [Type operation](#type-operation) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) | +| `typeof` | [Type annotation](#type-annotation) | Copies the type of an existing identifier ([spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3810-type-queries)) | | +| `undefined` | [Literal](#literal) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined) | | +| `undefined` | [Predefined type](#predefined-type) | [`undefined` type](Basic%20Types.md#null-and-undefined) | | +| `value` | [Property descriptors](#property-descriptors) | Value associated with a property | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| `var` | [Variable declaration](#variable-declaration) | [`var` declaration](Variable%20Declarations.md#var-declarations) | | +| `void` | | Evaluates expression but returns `undefined` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void) | +| `void` | [Predefined type](#predefined-type) | [`void` type](Basic%20Types.md#void) | | +| `while` | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while) | +| `writable` | [Property descriptors](#property-descriptors) | Can property be written to | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| `yield` | [Generator functions](#generator-functions) | | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) | --- ### By category -Category | Keyword | Description ----|---|--- -|
Literal
| `false` | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) -Literal | `null` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null) -Literal | `true` | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) -Literal | `undefined` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined) -Literal | `void` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void) -|
Variable declaration
| `const` | [`const` declaration](Variable%20Declarations.md#const-declarations) -Variable declaration | `let` | [`let` declaration](Variable%20Declarations.md#let-declarations) -Variable declaration | `var` | [`var` declaration](Variable%20Declarations.md#var-declarations) -|
Control flow
| `break` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/break) -Control flow | `continue` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/continue) -Control flow | `default` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/default) -Control flow | `do`...`while` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/do...while) -Control flow | `for` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for) -Control flow | `for`...`in` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in) -Control flow | `for`...`of` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) -Control flow | `if`...`else` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) -Control flow | `switch...case` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) -Control flow | `try`...`catch`...`finally` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) -Control flow | `while` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while) -|
Functions
| `function` | [Function declaration](Functions.md#functions) -Functions | `function` [_name_]`(this: ` _annotation_) | [`this` parameter](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#specifying-the-type-of-this-for-functions) -Functions | `return` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return) -Functions | `this` | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) -|
Generator functions
| `yield` | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) -|
Asynchronous functions
| `async` | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) -Asynchronous functions | `await` | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) -| | `debugger` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) -| | `delete` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) -| | `new` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new) -|
Predefined type
| `any` | [Describes a type unknown at design time](Basic%20Types.md#any) -Predefined type | `boolean` | [`boolean` type](Basic%20Types.md#boolean) -Predefined type | `never` | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) -Predefined type | `null` | [`null` type](Basic%20Types.md#null-and-undefined) -Predefined type | `number` | [`number` type](Basic%20Types.md#number) -Predefined type | `string` | [`string` type](Basic%20Types.md#string) -Predefined type | `symbol` | [`symbol` type](Symbols.md) -Predefined type | `undefined` | [`undefined` type](Basic%20Types.md#null-and-undefined) -Predefined type | `void` | [`void` type](Basic%20Types.md#void) -|
Type annotation
| `new` | Type annotation for constructor function ([spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#389-constructor-type-literals) -Type annotation | `this` | [Within a class/interface declaration, represents the actual type of an instance of the class/interface](Advanced%20Types.md#polymorphic-this-types) -Type annotation | `typeof` | Copies the type of an existing identifier ([spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3810-type-queries) -|
Type operation
| `as` | [Type assertion](Basic%20Types.md#type-assertions) -Type operation | `instanceof` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof) -Type operation | `typeof` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) -|
Environment/modules
| `as` | [Module import renaming](Modules.md#import) -Environment/modules | `declare` | [Ambient declarations](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#12-ambients) -Environment/modules | `default` | [Default exports](Modules.md#default-exports) -Environment/modules | `export` | Allow access to elements from outside the [module](Modules.md#export) or [namespace](Namespaces.md#namespacing) -Environment/modules | `from "`_path_`"` | [Location of imported module](Modules.md#import) -Environment/modules | `import` | [Enable access to exported elements in a module](Modules.md#import) -Environment/modules | `import` _symbol_ | [Synbol aliases](Namespaces.md#aliases) -Environment/modules | `module` | [Define an ambient module](Modules.md#ambient-modules) -Environment/modules | `namespace` | [Associates the contained elements with the specified namespace](Namespaces.md) -Environment/modules | `require` | [Import the custom object defined in a module with `export =`](Modules.md#export--and-import--require) -|
User-defined type
| `enum` | [Defines a set of named values](Enums.md) -User-defined type | `interface` | [Defines a type by its shape (structural typing)](Interfaces.md) -User-defined type | `type` | [Type alias](Advanced%20Types.md#type-aliases) -|
User-defined-type modifier
| `const enum` | [Forces a const enum](Enums.md) -User-defined-type modifier | `extends` | [Inheritance](Classes.md#inheritance) -|
Classes
| `abstract class` | [Abstract classes (cannot be instantiated; must be inherited)](Classes.md#abstract-classes) -Classes | `abstract` _member_ | [Inheriting classes must implement this method](Classes.md#abstract-classes) -Classes | `class` | [Class definition](Classes.md) -Classes | `constructor` | [Constructor functions](Classes.md#constructor-function) -Classes | `get` | [Getter](Classes.md#accessors) -Classes | `set` | [Setter](Classes.md#accessors) -Classes | `static` | [Static properties](Classes.md#static-properties) -Classes | `super` | Reference to properties / constructor of the base class [(spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#49-the-super-keyword) -Classes | `this is` _T_ | [`this`-based type guards](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#this-based-type-guards) -|
Accessibility modifier
| `private` | [Property can be used only from its containing class](Classes.md#understanding-private) -Accessibility modifier | `protected` | [Property can only be used in its containing class, or by classes which inherit from the containing class](Classes.md#understanding-protected) -Accessibility modifier | `public` | [Property can be used from outside its containing class](Classes.md#public-by-default) -|
Member modifier
| `readonly` | [Property's value can be read, but not written to](Classes.md#readonly-modifier) +Category | Keyword | Description | External links +---|---|---|--- +|
Literal
| `false` | ([spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type)) | | +| Literal | `null` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null) | +| Literal | `true` | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) | | +| Literal | `undefined` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined) | | +|
Variable declaration
| `const` | [`const` declaration](Variable%20Declarations.md#const-declarations) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const) | +| Variable declaration | `let` | [`let` declaration](Variable%20Declarations.md#let-declarations) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let) | +| Variable declaration | `var` | [`var` declaration](Variable%20Declarations.md#var-declarations) | | +|
Control flow
| `break` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/break) | +| Control flow | `continue` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/continue) | +| Control flow | `default` | Part of `switch...case` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/default) | +| Control flow | `do`...`while` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/do...while) | +| Control flow | `for` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for) | +| Control flow | `for`...`in` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in) | +| Control flow | `for`...`of` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) | +| Control flow | `if`...`else` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) | +| Control flow | `switch...case` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) | +| Control flow | `try`...`catch`...`finally` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) | +| Control flow | `while` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while) | +|
Functions
| `(this: ` _annotation_) | [`this` parameter](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#specifying-the-type-of-this-for-functions) | | +| Functions | `async` | Marks function as asynchronous | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) | +| Functions | `await` | Waits for value within an asynchronous function | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) | +| Functions | `function` | [Function declaration](Functions.md#functions) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function) | +| Functions | `return` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return) | +| Functions | `this` | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) | +|
Generator functions
| `yield` | | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) | +| | `debugger` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) | +| | `delete` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) | +| | `new` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new) | +| | `void` | Evaluates expression but returns `undefined` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void) | +|
Predefined type
| `any` | [Describes a type unknown at design time](Basic%20Types.md#any) | | +| Predefined type | `boolean` | [`boolean` type](Basic%20Types.md#boolean) | | +| Predefined type | `never` | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) | | +| Predefined type | `null` | [`null` type](Basic%20Types.md#null-and-undefined) | | +| Predefined type | `number` | [`number` type](Basic%20Types.md#number) | | +| Predefined type | `string` | [`string` type](Basic%20Types.md#string) | | +| Predefined type | `symbol` | [`symbol` type](Symbols.md) | | +| Predefined type | `undefined` | [`undefined` type](Basic%20Types.md#null-and-undefined) | | +| Predefined type | `void` | [`void` type](Basic%20Types.md#void) | | +|
Type annotation
| _parameter_ `is` _type_ | [User-defined type guards](Advanced%20Types.md#user-defined-type-guards) | | +| Type annotation | `new` | Constructor function type ([spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#389-constructor-type-literals)) | | +| Type annotation | `this` | [Within a class/interface declaration, represents the actual type of an instance of the class/interface](Advanced%20Types.md#polymorphic-this-types) | | +| Type annotation | `typeof` | Copies the type of an existing identifier ([spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3810-type-queries)) | | +|
Type operation
| `as` | [Type assertion](Basic%20Types.md#type-assertions) | | +| Type operation | `instanceof` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof) | +| Type operation | `typeof` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) | +|
Environment/modules
| `as` | [Module import renaming](Modules.md#import) | | +| Environment/modules | `declare` | [Ambient declarations](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#12-ambients) | | +| Environment/modules | `default` | [Default exports](Modules.md#default-exports) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export) | +| Environment/modules | `export` | Allow access to elements from outside the [module](Modules.md#export) or [namespace](Namespaces.md#namespacing) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export) | +| Environment/modules | `from "`_path_`"` | [Location of imported module](Modules.md#import) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) | +| Environment/modules | `import` | [Enable access to exported elements in a module](Modules.md#import) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) | +| Environment/modules | `import` _symbol_ | [Synbol aliases](Namespaces.md#aliases) | | +| Environment/modules | `module` | [Define an ambient module](Modules.md#ambient-modules) | | +| Environment/modules | `namespace` | [Associates the contained elements with the specified namespace](Namespaces.md) | | +| Environment/modules | `require` | [Import the custom object defined in a module with `export =`](Modules.md#export--and-import--require) | | +|
User-defined type
| `enum` | [Defines a set of named values](Enums.md) | | +| User-defined type | `interface` | [Defines a type by its shape (structural typing)](Interfaces.md) | | +| User-defined type | `type` | [Type alias](Advanced%20Types.md#type-aliases) | | +|
User-defined-type modifier
| _class_ `implements` _interface_ | [Class must match the shape of the interface](Interfaces.md#implementing-an-interface) | | +| User-defined-type modifier | `const enum` | [Forces a const enum](Enums.md) | | +| User-defined-type modifier | `extends` | [Inheritance](Classes.md#inheritance) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class) | +|
Classes
| `abstract class` | [Abstract classes (cannot be instantiated; must be inherited)](Classes.md#abstract-classes) | | +| Classes | `abstract` _member_ | [Inheriting classes must implement this method/property](Classes.md#abstract-classes) | | +| Classes | `class` | [Class declaration/expression](Classes.md) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes) | +| Classes | `constructor` | [Constructor functions](Classes.md#constructor-function) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/constructor) | +| Classes | `get` | [Getter](Classes.md#accessors) | | +| Classes | `set` | [Setter](Classes.md#accessors) | | +| Classes | `static` | [Static properties](Classes.md#static-properties) | | +| Classes | `super` | Reference to properties / constructor of the base class [(spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#49-the-super-keyword) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#Super_class_calls_with_super) | +| Classes | `this is` _T_ | [`this`-based type guards](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#this-based-type-guards) | | +|
Accessibility modifier
| `private` | [Property can be used only from its containing class](Classes.md#understanding-private) | | +| Accessibility modifier | `protected` | [Property can only be used in its containing class, or by classes which inherit from the containing class](Classes.md#understanding-protected) | | +| Accessibility modifier | `public` | [Property can be used from outside its containing class](Classes.md#public-by-default) | | +|
Member modifier
| `readonly` | [Property's value can be read, but not written to](Classes.md#readonly-modifier) | | +|
Property descriptors
| `configurable` | Getter | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| Property descriptors | `enumerable` | Is visible when properties are enumerated | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| Property descriptors | `get` | Getter | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| Property descriptors | `set` | Setter | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| Property descriptors | `value` | Value associated with a property | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| Property descriptors | `writable` | Can property be written to | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | \ No newline at end of file From 58a74c997917d9118be78237402a5fbc0d88e1c0 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 1 Aug 2016 04:42:09 +0200 Subject: [PATCH 35/45] Reordered property descriptor keywords --- pages/Keywords.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index 04037773c..555f3b4dc 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -114,6 +114,12 @@ Category | Keyword | Description | External links | Functions | `return` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return) | | Functions | `this` | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) | |
Generator functions
| `yield` | | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) | +|
Property descriptors
| `configurable` | Getter | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| Property descriptors | `enumerable` | Is visible when properties are enumerated | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| Property descriptors | `get` | Getter | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| Property descriptors | `set` | Setter | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| Property descriptors | `value` | Value associated with a property | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| Property descriptors | `writable` | Can property be written to | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | | | `debugger` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) | | | `delete` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) | | | `new` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new) | @@ -163,9 +169,3 @@ Category | Keyword | Description | External links | Accessibility modifier | `protected` | [Property can only be used in its containing class, or by classes which inherit from the containing class](Classes.md#understanding-protected) | | | Accessibility modifier | `public` | [Property can be used from outside its containing class](Classes.md#public-by-default) | | |
Member modifier
| `readonly` | [Property's value can be read, but not written to](Classes.md#readonly-modifier) | | -|
Property descriptors
| `configurable` | Getter | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | -| Property descriptors | `enumerable` | Is visible when properties are enumerated | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | -| Property descriptors | `get` | Getter | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | -| Property descriptors | `set` | Setter | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | -| Property descriptors | `value` | Value associated with a property | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | -| Property descriptors | `writable` | Can property be written to | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | \ No newline at end of file From 6f7766c9c6e74cd66aa8ffe60ebac5a02e166dfb Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 1 Aug 2016 05:11:32 +0200 Subject: [PATCH 36/45] Reordered category column after description --- pages/Keywords.md | 174 +++++++++++++++++++++++----------------------- 1 file changed, 87 insertions(+), 87 deletions(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index 555f3b4dc..744560b61 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -1,87 +1,87 @@ # Keywords -Keyword | Category | Description | External links +Keyword | Description | Category | External links ---|---|---|--- -| `abstract class` | [Classes](#classes) | [Abstract classes (cannot be instantiated; must be inherited)](Classes.md#abstract-classes) | | -| `abstract` _member_ | [Classes](#classes) | [Inheriting classes must implement this method/property](Classes.md#abstract-classes) | | -| `any` | [Predefined type](#predefined-type) | [Describes a type unknown at design time](Basic%20Types.md#any) | | -| `as` | [Type operation](#type-operation) | [Type assertion](Basic%20Types.md#type-assertions) | | -| `as` | [Environment/modules](#environment-modules) | [Module import renaming](Modules.md#import) | | -| `async` | [Functions](#functions) | Marks function as asynchronous | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) | -| `await` | [Functions](#functions) | Waits for value within an asynchronous function | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) | -| `boolean` | [Predefined type](#predefined-type) | [`boolean` type](Basic%20Types.md#boolean) | | -| `break` | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/break) | -| `continue` | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/continue) | -| `class` | [Classes](#classes) | [Class declaration/expression](Classes.md) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes) | -| `const` | [Variable declaration](#variable-declaration) | [`const` declaration](Variable%20Declarations.md#const-declarations) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const) | -| `const enum` | [User-defined-type modifier](#user-defined-type-modifier) | [Forces a const enum](Enums.md) | | -| `configurable` | [Property descriptors](#property-descriptors) | Getter | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | -| `constructor` | [Classes](#classes) | [Constructor functions](Classes.md#constructor-function) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/constructor) | -| `debugger` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) | -| `declare` | [Environment/modules](#environment-modules) | [Ambient declarations](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#12-ambients) | | -| `default` | [Control flow](#control-flow) | Part of `switch...case` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/default) | -| `default` | [Environment/modules](#environment-modules) | [Default exports](Modules.md#default-exports) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export) | -| `delete` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) | -| `do`...`while` | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/do...while) | -| `enum` | [User-defined type](#user-defined-type) | [Defines a set of named values](Enums.md) | | -| `enumerable` | [Property descriptors](#property-descriptors) | Is visible when properties are enumerated | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | -| `export` | [Environment/modules](#environment-modules) | Allow access to elements from outside the [module](Modules.md#export) or [namespace](Namespaces.md#namespacing) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export) | -| `extends` | [User-defined-type modifier](#user-defined-type-modifier) | [Inheritance](Classes.md#inheritance) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class) | -| `false` | [Literal](#literal) | ([spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type)) | | -| `for` | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for) | -| `for`...`in` | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in) | -| `for`...`of` | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) | -| `from "`_path_`"` | [Environment/modules](#environment-modules) | [Location of imported module](Modules.md#import) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) | -| `function` | [Functions](#functions) | [Function declaration](Functions.md#functions) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function) | -| `get` | [Property descriptors](#property-descriptors) | Getter | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | -| `get` | [Classes](#classes) | [Getter](Classes.md#accessors) | | -| `if`...`else` | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) | -| _class_ `implements` _interface_ | [User-defined-type modifier](#user-defined-type-modifier) | [Class must match the shape of the interface](Interfaces.md#implementing-an-interface) | | -| `import` | [Environment/modules](#environment-modules) | [Enable access to exported elements in a module](Modules.md#import) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) | -| `import` _symbol_ | [Environment/modules](#environment-modules) | [Synbol aliases](Namespaces.md#aliases) | | -| `instanceof` | [Type operation](#type-operation) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof) | -| `interface` | [User-defined type](#user-defined-type) | [Defines a type by its shape (structural typing)](Interfaces.md) | | -| _parameter_ `is` _type_ | [Type annotation](#type-annotation) | [User-defined type guards](Advanced%20Types.md#user-defined-type-guards) | | -| `let` | [Variable declaration](#variable-declaration) | [`let` declaration](Variable%20Declarations.md#let-declarations) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let) | -| `module` | [Environment/modules](#environment-modules) | [Define an ambient module](Modules.md#ambient-modules) | | -| `namespace` | [Environment/modules](#environment-modules) | [Associates the contained elements with the specified namespace](Namespaces.md) | | -| `never` | [Predefined type](#predefined-type) | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) | | -| `new` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new) | -| `new` | [Type annotation](#type-annotation) | Constructor function type ([spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#389-constructor-type-literals)) | | -| `null` | [Literal](#literal) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null) | -| `null` | [Predefined type](#predefined-type) | [`null` type](Basic%20Types.md#null-and-undefined) | | -| `number` | [Predefined type](#predefined-type) | [`number` type](Basic%20Types.md#number) | | -| `private` | [Accessibility modifier](#accessibility-modifier) | [Property can be used only from its containing class](Classes.md#understanding-private) | | -| `protected` | [Accessibility modifier](#accessibility-modifier) | [Property can only be used in its containing class, or by classes which inherit from the containing class](Classes.md#understanding-protected) | | -| `public` | [Accessibility modifier](#accessibility-modifier) | [Property can be used from outside its containing class](Classes.md#public-by-default) | | -| `readonly` | [Member modifier](#member-modifier) | [Property's value can be read, but not written to](Classes.md#readonly-modifier) | | -| `require` | [Environment/modules](#environment-modules) | [Import the custom object defined in a module with `export =`](Modules.md#export--and-import--require) | | -| `return` | [Functions](#functions) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return) | -| `set` | [Property descriptors](#property-descriptors) | Setter | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | -| `set` | [Classes](#classes) | [Setter](Classes.md#accessors) | | -| `static` | [Classes](#classes) | [Static properties](Classes.md#static-properties) | | -| `string` | [Predefined type](#predefined-type) | [`string` type](Basic%20Types.md#string) | | -| `super` | [Classes](#classes) | Reference to properties / constructor of the base class [(spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#49-the-super-keyword) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#Super_class_calls_with_super) | -| `switch...case` | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) | -| `symbol` | [Predefined type](#predefined-type) | [`symbol` type](Symbols.md) | | -| `this` | [Functions](#functions) | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) | -| `this` | [Type annotation](#type-annotation) | [Within a class/interface declaration, represents the actual type of an instance of the class/interface](Advanced%20Types.md#polymorphic-this-types) | | -| `(this: ` _annotation_) | [Functions](#functions) | [`this` parameter](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#specifying-the-type-of-this-for-functions) | | -| `this is` _T_ | [Classes](#classes) | [`this`-based type guards](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#this-based-type-guards) | | -| `true` | [Literal](#literal) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) | | -| `try`...`catch`...`finally` | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) | -| `type` | [User-defined type](#user-defined-type) | [Type alias](Advanced%20Types.md#type-aliases) | | -| `typeof` | [Type operation](#type-operation) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) | -| `typeof` | [Type annotation](#type-annotation) | Copies the type of an existing identifier ([spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3810-type-queries)) | | -| `undefined` | [Literal](#literal) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined) | | -| `undefined` | [Predefined type](#predefined-type) | [`undefined` type](Basic%20Types.md#null-and-undefined) | | -| `value` | [Property descriptors](#property-descriptors) | Value associated with a property | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | -| `var` | [Variable declaration](#variable-declaration) | [`var` declaration](Variable%20Declarations.md#var-declarations) | | -| `void` | | Evaluates expression but returns `undefined` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void) | -| `void` | [Predefined type](#predefined-type) | [`void` type](Basic%20Types.md#void) | | -| `while` | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while) | -| `writable` | [Property descriptors](#property-descriptors) | Can property be written to | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | -| `yield` | [Generator functions](#generator-functions) | | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) | +| `abstract class` | [Abstract classes (cannot be instantiated; must be inherited)](Classes.md#abstract-classes) | [Classes](#classes) | | +| `abstract` _member_ | [Inheriting classes must implement this method/property](Classes.md#abstract-classes) | [Classes](#classes) | | +| `any` | [Describes a type unknown at design time](Basic%20Types.md#any) | [Predefined type](#predefined-type) | | +| `as` | [Type assertion](Basic%20Types.md#type-assertions) | [Type operation](#type-operation) | | +| `as` | [Module import renaming](Modules.md#import) | [Environment/modules](#environment-modules) | | +| `async` | Marks function as asynchronous | [Functions](#functions) | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) | +| `await` | Waits for value within an asynchronous function | [Functions](#functions) | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) | +| `boolean` | [`boolean` type](Basic%20Types.md#boolean) | [Predefined type](#predefined-type) | | +| `break` | | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/break) | +| `continue` | | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/continue) | +| `class` | [Class declaration/expression](Classes.md) | [Classes](#classes) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes) | +| `const` | [`const` declaration](Variable%20Declarations.md#const-declarations) | [Variable declaration](#variable-declaration) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const) | +| `const enum` | [Forces a const enum](Enums.md) | [User-defined-type modifier](#user-defined-type-modifier) | | +| `configurable` | Getter | [Property descriptors](#property-descriptors) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| `constructor` | [Constructor functions](Classes.md#constructor-function) | [Classes](#classes) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/constructor) | +| `debugger` | | [](#) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) | +| `declare` | [Ambient declarations](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#12-ambients) | [Environment/modules](#environment-modules) | | +| `default` | Part of `switch...case` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/default) | +| `default` | [Default exports](Modules.md#default-exports) | [Environment/modules](#environment-modules) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export) | +| `delete` | | [](#) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) | +| `do`...`while` | | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/do...while) | +| `enum` | [Defines a set of named values](Enums.md) | [User-defined type](#user-defined-type) | | +| `enumerable` | Is visible when properties are enumerated | [Property descriptors](#property-descriptors) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| `export` | Allow access to elements from outside the [module](Modules.md#export) or [namespace](Namespaces.md#namespacing) | [Environment/modules](#environment-modules) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export) | +| `extends` | [Inheritance](Classes.md#inheritance) | [User-defined-type modifier](#user-defined-type-modifier) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class) | +| `false` | | [Literal](#literal) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) | +| `for` | | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for) | +| `for`...`in` | | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in) | +| `for`...`of` | | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) | +| `from "`_path_`"` | [Location of imported module](Modules.md#import) | [Environment/modules](#environment-modules) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) | +| `function` | [Function declaration](Functions.md#functions) | [Functions](#functions) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function) | +| `get` | Getter | [Property descriptors](#property-descriptors) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| `get` | [Getter](Classes.md#accessors) | [Classes](#classes) | | +| `if`...`else` | | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) | +| _class_ `implements` _interface_ | [Class must match the shape of the interface](Interfaces.md#implementing-an-interface) | [User-defined-type modifier](#user-defined-type-modifier) | | +| `import` | [Enable access to exported elements in a module](Modules.md#import) | [Environment/modules](#environment-modules) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) | +| `import` _alias_ `=` _symbol_ | [Define an alias of _symbol_](Namespaces.md#aliases) | [Environment/modules](#environment-modules) | | +| `instanceof` | | [Type operation](#type-operation) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof) | +| `interface` | [Defines a type by its shape (structural typing)](Interfaces.md) | [User-defined type](#user-defined-type) | | +| _parameter_ `is` _type_ | [User-defined type guards](Advanced%20Types.md#user-defined-type-guards) | [Type annotation](#type-annotation) | | +| `let` | [`let` declaration](Variable%20Declarations.md#let-declarations) | [Variable declaration](#variable-declaration) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let) | +| `module` | [Define an ambient module](Modules.md#ambient-modules) | [Environment/modules](#environment-modules) | | +| `namespace` | [Associates the contained elements with the specified namespace](Namespaces.md) | [Environment/modules](#environment-modules) | | +| `never` | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) | [Predefined type](#predefined-type) | | +| `new` | | [](#) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new) | +| `new` | Constructor function type | [Type annotation](#type-annotation) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#389-constructor-type-literals) | +| `null` | | [Literal](#literal) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null) | +| `null` | [`null` type](Basic%20Types.md#null-and-undefined) | [Predefined type](#predefined-type) | | +| `number` | [`number` type](Basic%20Types.md#number) | [Predefined type](#predefined-type) | | +| `private` | [Property can be used only from its containing class](Classes.md#understanding-private) | [Accessibility modifier](#accessibility-modifier) | | +| `protected` | [Property can only be used in its containing class, or by classes which inherit from the containing class](Classes.md#understanding-protected) | [Accessibility modifier](#accessibility-modifier) | | +| `public` | [Property can be used from outside its containing class](Classes.md#public-by-default) | [Accessibility modifier](#accessibility-modifier) | | +| `readonly` | [Property's value can be read, but not written to](Classes.md#readonly-modifier) | [Member modifier](#member-modifier) | | +| `require` | [Import the custom object defined in a module with `export =`](Modules.md#export--and-import--require) | [Environment/modules](#environment-modules) | | +| `return` | | [Functions](#functions) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return) | +| `set` | Setter | [Property descriptors](#property-descriptors) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| `set` | [Setter](Classes.md#accessors) | [Classes](#classes) | | +| `static` | [Static properties](Classes.md#static-properties) | [Classes](#classes) | | +| `string` | [`string` type](Basic%20Types.md#string) | [Predefined type](#predefined-type) | | +| `super` | Reference to properties / constructor of the base class [(spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#49-the-super-keyword) | [Classes](#classes) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#Super_class_calls_with_super) | +| `switch...case` | | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) | +| `symbol` | [`symbol` type](Symbols.md) | [Predefined type](#predefined-type) | | +| `this` | | [Functions](#functions) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) | +| `this` | [Within a class/interface declaration, represents the actual type of an instance of the class/interface](Advanced%20Types.md#polymorphic-this-types) | [Type annotation](#type-annotation) | | +| `(this: ` _annotation_) | [`this` parameter](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#specifying-the-type-of-this-for-functions) | [Functions](#functions) | | +| `this is` _T_ | [`this`-based type guards](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#this-based-type-guards) | [Classes](#classes) | | +| `true` | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) | [Literal](#literal) | | +| `try`...`catch`...`finally` | | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) | +| `type` | [Type alias](Advanced%20Types.md#type-aliases) | [User-defined type](#user-defined-type) | | +| `typeof` | | [Type operation](#type-operation) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) | +| `typeof` | Copies the type of an existing identifier | [Type annotation](#type-annotation) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3810-type-queries) | +| `undefined` | | [Literal](#literal) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined) | +| `undefined` | [`undefined` type](Basic%20Types.md#null-and-undefined) | [Predefined type](#predefined-type) | | +| `value` | Value associated with a property | [Property descriptors](#property-descriptors) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| `var` | [`var` declaration](Variable%20Declarations.md#var-declarations) | [Variable declaration](#variable-declaration) | | +| `void` | Evaluates expression but returns `undefined` | [](#) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void) | +| `void` | [`void` type](Basic%20Types.md#void) | [Predefined type](#predefined-type) | | +| `while` | | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while) | +| `writable` | Can property be written to | [Property descriptors](#property-descriptors) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| `yield` | | [Generator functions](#generator-functions) | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) | --- @@ -89,10 +89,10 @@ Keyword | Category | Description | External links Category | Keyword | Description | External links ---|---|---|--- -|
Literal
| `false` | ([spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type)) | | +|
Literal
| `false` | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) | | Literal | `null` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null) | | Literal | `true` | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) | | -| Literal | `undefined` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined) | | +| Literal | `undefined` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined) | |
Variable declaration
| `const` | [`const` declaration](Variable%20Declarations.md#const-declarations) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const) | | Variable declaration | `let` | [`let` declaration](Variable%20Declarations.md#let-declarations) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let) | | Variable declaration | `var` | [`var` declaration](Variable%20Declarations.md#var-declarations) | | @@ -134,9 +134,9 @@ Category | Keyword | Description | External links | Predefined type | `undefined` | [`undefined` type](Basic%20Types.md#null-and-undefined) | | | Predefined type | `void` | [`void` type](Basic%20Types.md#void) | | |
Type annotation
| _parameter_ `is` _type_ | [User-defined type guards](Advanced%20Types.md#user-defined-type-guards) | | -| Type annotation | `new` | Constructor function type ([spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#389-constructor-type-literals)) | | +| Type annotation | `new` | Constructor function type | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#389-constructor-type-literals) | | Type annotation | `this` | [Within a class/interface declaration, represents the actual type of an instance of the class/interface](Advanced%20Types.md#polymorphic-this-types) | | -| Type annotation | `typeof` | Copies the type of an existing identifier ([spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3810-type-queries)) | | +| Type annotation | `typeof` | Copies the type of an existing identifier | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3810-type-queries) | |
Type operation
| `as` | [Type assertion](Basic%20Types.md#type-assertions) | | | Type operation | `instanceof` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof) | | Type operation | `typeof` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) | @@ -146,7 +146,7 @@ Category | Keyword | Description | External links | Environment/modules | `export` | Allow access to elements from outside the [module](Modules.md#export) or [namespace](Namespaces.md#namespacing) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export) | | Environment/modules | `from "`_path_`"` | [Location of imported module](Modules.md#import) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) | | Environment/modules | `import` | [Enable access to exported elements in a module](Modules.md#import) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) | -| Environment/modules | `import` _symbol_ | [Synbol aliases](Namespaces.md#aliases) | | +| Environment/modules | `import` _alias_ `=` _symbol_ | [Define an alias of _symbol_](Namespaces.md#aliases) | | | Environment/modules | `module` | [Define an ambient module](Modules.md#ambient-modules) | | | Environment/modules | `namespace` | [Associates the contained elements with the specified namespace](Namespaces.md) | | | Environment/modules | `require` | [Import the custom object defined in a module with `export =`](Modules.md#export--and-import--require) | | @@ -168,4 +168,4 @@ Category | Keyword | Description | External links |
Accessibility modifier
| `private` | [Property can be used only from its containing class](Classes.md#understanding-private) | | | Accessibility modifier | `protected` | [Property can only be used in its containing class, or by classes which inherit from the containing class](Classes.md#understanding-protected) | | | Accessibility modifier | `public` | [Property can be used from outside its containing class](Classes.md#public-by-default) | | -|
Member modifier
| `readonly` | [Property's value can be read, but not written to](Classes.md#readonly-modifier) | | +|
Member modifier
| `readonly` | [Property's value can be read, but not written to](Classes.md#readonly-modifier) | | \ No newline at end of file From 8eae732bac03d862d08dad2604097703c8bb1cdb Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 1 Aug 2016 05:19:06 +0200 Subject: [PATCH 37/45] Fixed empty links; categroixed yield with functions --- pages/Keywords.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index 744560b61..c0e8109ff 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -17,11 +17,11 @@ Keyword | Description | Category | External links | `const enum` | [Forces a const enum](Enums.md) | [User-defined-type modifier](#user-defined-type-modifier) | | | `configurable` | Getter | [Property descriptors](#property-descriptors) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | | `constructor` | [Constructor functions](Classes.md#constructor-function) | [Classes](#classes) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/constructor) | -| `debugger` | | [](#) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) | +| `debugger` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) | | `declare` | [Ambient declarations](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#12-ambients) | [Environment/modules](#environment-modules) | | | `default` | Part of `switch...case` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/default) | | `default` | [Default exports](Modules.md#default-exports) | [Environment/modules](#environment-modules) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export) | -| `delete` | | [](#) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) | +| `delete` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) | | `do`...`while` | | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/do...while) | | `enum` | [Defines a set of named values](Enums.md) | [User-defined type](#user-defined-type) | | | `enumerable` | Is visible when properties are enumerated | [Property descriptors](#property-descriptors) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | @@ -46,7 +46,7 @@ Keyword | Description | Category | External links | `module` | [Define an ambient module](Modules.md#ambient-modules) | [Environment/modules](#environment-modules) | | | `namespace` | [Associates the contained elements with the specified namespace](Namespaces.md) | [Environment/modules](#environment-modules) | | | `never` | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) | [Predefined type](#predefined-type) | | -| `new` | | [](#) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new) | +| `new` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new) | | `new` | Constructor function type | [Type annotation](#type-annotation) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#389-constructor-type-literals) | | `null` | | [Literal](#literal) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null) | | `null` | [`null` type](Basic%20Types.md#null-and-undefined) | [Predefined type](#predefined-type) | | @@ -77,11 +77,11 @@ Keyword | Description | Category | External links | `undefined` | [`undefined` type](Basic%20Types.md#null-and-undefined) | [Predefined type](#predefined-type) | | | `value` | Value associated with a property | [Property descriptors](#property-descriptors) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | | `var` | [`var` declaration](Variable%20Declarations.md#var-declarations) | [Variable declaration](#variable-declaration) | | -| `void` | Evaluates expression but returns `undefined` | [](#) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void) | +| `void` | Evaluates expression but returns `undefined` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void) | | `void` | [`void` type](Basic%20Types.md#void) | [Predefined type](#predefined-type) | | | `while` | | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while) | | `writable` | Can property be written to | [Property descriptors](#property-descriptors) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | -| `yield` | | [Generator functions](#generator-functions) | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) | +| `yield` | Returns next value of generator function | [Functions](#functions) | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) | --- @@ -113,7 +113,7 @@ Category | Keyword | Description | External links | Functions | `function` | [Function declaration](Functions.md#functions) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function) | | Functions | `return` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return) | | Functions | `this` | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) | -|
Generator functions
| `yield` | | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) | +| Functions | `yield` | Returns next value of generator function | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) | |
Property descriptors
| `configurable` | Getter | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | | Property descriptors | `enumerable` | Is visible when properties are enumerated | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | | Property descriptors | `get` | Getter | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | From eb5f8b495ebc7d193e6db4cc4e03704ad56c45b4 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 1 Aug 2016 05:26:48 +0200 Subject: [PATCH 38/45] Fixed configurable description --- pages/Keywords.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index c0e8109ff..56d77dfa5 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -15,7 +15,7 @@ Keyword | Description | Category | External links | `class` | [Class declaration/expression](Classes.md) | [Classes](#classes) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes) | | `const` | [`const` declaration](Variable%20Declarations.md#const-declarations) | [Variable declaration](#variable-declaration) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const) | | `const enum` | [Forces a const enum](Enums.md) | [User-defined-type modifier](#user-defined-type-modifier) | | -| `configurable` | Getter | [Property descriptors](#property-descriptors) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| `configurable` | Can property descriptor be changed | [Property descriptors](#property-descriptors) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | | `constructor` | [Constructor functions](Classes.md#constructor-function) | [Classes](#classes) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/constructor) | | `debugger` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) | | `declare` | [Ambient declarations](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#12-ambients) | [Environment/modules](#environment-modules) | | @@ -114,7 +114,7 @@ Category | Keyword | Description | External links | Functions | `return` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return) | | Functions | `this` | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) | | Functions | `yield` | Returns next value of generator function | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) | -|
Property descriptors
| `configurable` | Getter | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +|
Property descriptors
| `configurable` | Can property descriptor be changed | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | | Property descriptors | `enumerable` | Is visible when properties are enumerated | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | | Property descriptors | `get` | Getter | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | | Property descriptors | `set` | Setter | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | From b2ef7430a4ecdc1d284d0648d9ddbee268f9fe59 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Mon, 1 Aug 2016 05:29:01 +0200 Subject: [PATCH 39/45] Fixed constructor link --- pages/Keywords.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index 56d77dfa5..1a9d4090d 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -16,7 +16,7 @@ Keyword | Description | Category | External links | `const` | [`const` declaration](Variable%20Declarations.md#const-declarations) | [Variable declaration](#variable-declaration) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const) | | `const enum` | [Forces a const enum](Enums.md) | [User-defined-type modifier](#user-defined-type-modifier) | | | `configurable` | Can property descriptor be changed | [Property descriptors](#property-descriptors) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | -| `constructor` | [Constructor functions](Classes.md#constructor-function) | [Classes](#classes) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/constructor) | +| `constructor` | [Constructor functions](Classes.md#constructor-functions) | [Classes](#classes) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/constructor) | | `debugger` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) | | `declare` | [Ambient declarations](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#12-ambients) | [Environment/modules](#environment-modules) | | | `default` | Part of `switch...case` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/default) | @@ -159,7 +159,7 @@ Category | Keyword | Description | External links |
Classes
| `abstract class` | [Abstract classes (cannot be instantiated; must be inherited)](Classes.md#abstract-classes) | | | Classes | `abstract` _member_ | [Inheriting classes must implement this method/property](Classes.md#abstract-classes) | | | Classes | `class` | [Class declaration/expression](Classes.md) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes) | -| Classes | `constructor` | [Constructor functions](Classes.md#constructor-function) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/constructor) | +| Classes | `constructor` | [Constructor functions](Classes.md#constructor-functions) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/constructor) | | Classes | `get` | [Getter](Classes.md#accessors) | | | Classes | `set` | [Setter](Classes.md#accessors) | | | Classes | `static` | [Static properties](Classes.md#static-properties) | | From 6d4c1039705ec833f1b1178edf8537f37365fa2a Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Thu, 4 Aug 2016 05:52:55 +0200 Subject: [PATCH 40/45] Moved some spec links to external links column --- pages/Keywords.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index 1a9d4090d..914e7ae58 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -61,14 +61,14 @@ Keyword | Description | Category | External links | `set` | [Setter](Classes.md#accessors) | [Classes](#classes) | | | `static` | [Static properties](Classes.md#static-properties) | [Classes](#classes) | | | `string` | [`string` type](Basic%20Types.md#string) | [Predefined type](#predefined-type) | | -| `super` | Reference to properties / constructor of the base class [(spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#49-the-super-keyword) | [Classes](#classes) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#Super_class_calls_with_super) | +| `super` | Reference to properties / constructor of the base class | [Classes](#classes) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#49-the-super-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#Super_class_calls_with_super) | | `switch...case` | | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) | | `symbol` | [`symbol` type](Symbols.md) | [Predefined type](#predefined-type) | | | `this` | | [Functions](#functions) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) | | `this` | [Within a class/interface declaration, represents the actual type of an instance of the class/interface](Advanced%20Types.md#polymorphic-this-types) | [Type annotation](#type-annotation) | | | `(this: ` _annotation_) | [`this` parameter](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#specifying-the-type-of-this-for-functions) | [Functions](#functions) | | | `this is` _T_ | [`this`-based type guards](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#this-based-type-guards) | [Classes](#classes) | | -| `true` | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) | [Literal](#literal) | | +| `true` | | [Literal](#literal) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) | | `try`...`catch`...`finally` | | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) | | `type` | [Type alias](Advanced%20Types.md#type-aliases) | [User-defined type](#user-defined-type) | | | `typeof` | | [Type operation](#type-operation) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) | @@ -91,7 +91,7 @@ Category | Keyword | Description | External links ---|---|---|--- |
Literal
| `false` | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) | | Literal | `null` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null) | -| Literal | `true` | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) | | +| Literal | `true` | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) | | Literal | `undefined` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined) | |
Variable declaration
| `const` | [`const` declaration](Variable%20Declarations.md#const-declarations) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const) | | Variable declaration | `let` | [`let` declaration](Variable%20Declarations.md#let-declarations) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let) | @@ -163,7 +163,7 @@ Category | Keyword | Description | External links | Classes | `get` | [Getter](Classes.md#accessors) | | | Classes | `set` | [Setter](Classes.md#accessors) | | | Classes | `static` | [Static properties](Classes.md#static-properties) | | -| Classes | `super` | Reference to properties / constructor of the base class [(spec)](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#49-the-super-keyword) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#Super_class_calls_with_super) | +| Classes | `super` | Reference to properties / constructor of the base class | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#49-the-super-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#Super_class_calls_with_super) | | Classes | `this is` _T_ | [`this`-based type guards](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#this-based-type-guards) | | |
Accessibility modifier
| `private` | [Property can be used only from its containing class](Classes.md#understanding-private) | | | Accessibility modifier | `protected` | [Property can only be used in its containing class, or by classes which inherit from the containing class](Classes.md#understanding-protected) | | From 70f41dd720f7cbf3dfd51a2301698fd933c61381 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Thu, 4 Aug 2016 06:34:17 +0200 Subject: [PATCH 41/45] Fixed this-parameter link to Handbook --- pages/Keywords.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index 914e7ae58..60a3780a1 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -66,7 +66,7 @@ Keyword | Description | Category | External links | `symbol` | [`symbol` type](Symbols.md) | [Predefined type](#predefined-type) | | | `this` | | [Functions](#functions) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) | | `this` | [Within a class/interface declaration, represents the actual type of an instance of the class/interface](Advanced%20Types.md#polymorphic-this-types) | [Type annotation](#type-annotation) | | -| `(this: ` _annotation_) | [`this` parameter](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#specifying-the-type-of-this-for-functions) | [Functions](#functions) | | +| `(this: ` _annotation_) | [`this` parameter](Functions.md#this-parameters) | [Functions](#functions) | | | `this is` _T_ | [`this`-based type guards](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#this-based-type-guards) | [Classes](#classes) | | | `true` | | [Literal](#literal) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) | | `try`...`catch`...`finally` | | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) | @@ -107,7 +107,7 @@ Category | Keyword | Description | External links | Control flow | `switch...case` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) | | Control flow | `try`...`catch`...`finally` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) | | Control flow | `while` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while) | -|
Functions
| `(this: ` _annotation_) | [`this` parameter](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#specifying-the-type-of-this-for-functions) | | +|
Functions
| `(this: ` _annotation_) | [`this` parameter](Functions.md#this-parameters) | | | Functions | `async` | Marks function as asynchronous | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) | | Functions | `await` | Waits for value within an asynchronous function | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) | | Functions | `function` | [Function declaration](Functions.md#functions) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function) | From 124169507fc1d7ebe6f9242bc9fcbaf67b167171 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Thu, 4 Aug 2016 07:48:01 +0200 Subject: [PATCH 42/45] Fixed polymorphic this-type link --- pages/Keywords.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index 60a3780a1..6c97f5f34 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -65,7 +65,7 @@ Keyword | Description | Category | External links | `switch...case` | | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) | | `symbol` | [`symbol` type](Symbols.md) | [Predefined type](#predefined-type) | | | `this` | | [Functions](#functions) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) | -| `this` | [Within a class/interface declaration, represents the actual type of an instance of the class/interface](Advanced%20Types.md#polymorphic-this-types) | [Type annotation](#type-annotation) | | +| `this` | Represents the actual type ([derived or implemented](Advanced%20Types.md#polymorphic-this-types)) within a (base) class or interface | [Type annotation](#type-annotation) | | | `(this: ` _annotation_) | [`this` parameter](Functions.md#this-parameters) | [Functions](#functions) | | | `this is` _T_ | [`this`-based type guards](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#this-based-type-guards) | [Classes](#classes) | | | `true` | | [Literal](#literal) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) | @@ -135,7 +135,7 @@ Category | Keyword | Description | External links | Predefined type | `void` | [`void` type](Basic%20Types.md#void) | | |
Type annotation
| _parameter_ `is` _type_ | [User-defined type guards](Advanced%20Types.md#user-defined-type-guards) | | | Type annotation | `new` | Constructor function type | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#389-constructor-type-literals) | -| Type annotation | `this` | [Within a class/interface declaration, represents the actual type of an instance of the class/interface](Advanced%20Types.md#polymorphic-this-types) | | +| Type annotation | `this` | Represents the actual type ([derived or implemented](Advanced%20Types.md#polymorphic-this-types)) within a (base) class or interface | | | Type annotation | `typeof` | Copies the type of an existing identifier | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3810-type-queries) | |
Type operation
| `as` | [Type assertion](Basic%20Types.md#type-assertions) | | | Type operation | `instanceof` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof) | From 99ab9ee493fe13430b09a8a9fe33b7e5f066e55f Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Thu, 11 Aug 2016 14:35:11 +0200 Subject: [PATCH 43/45] Added Syntax column --- pages/Keywords.md | 330 +++++++++++++++++++++++----------------------- 1 file changed, 166 insertions(+), 164 deletions(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index 6c97f5f34..1e2805de8 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -1,171 +1,173 @@ # Keywords -Keyword | Description | Category | External links ----|---|---|--- -| `abstract class` | [Abstract classes (cannot be instantiated; must be inherited)](Classes.md#abstract-classes) | [Classes](#classes) | | -| `abstract` _member_ | [Inheriting classes must implement this method/property](Classes.md#abstract-classes) | [Classes](#classes) | | -| `any` | [Describes a type unknown at design time](Basic%20Types.md#any) | [Predefined type](#predefined-type) | | -| `as` | [Type assertion](Basic%20Types.md#type-assertions) | [Type operation](#type-operation) | | -| `as` | [Module import renaming](Modules.md#import) | [Environment/modules](#environment-modules) | | -| `async` | Marks function as asynchronous | [Functions](#functions) | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) | -| `await` | Waits for value within an asynchronous function | [Functions](#functions) | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) | -| `boolean` | [`boolean` type](Basic%20Types.md#boolean) | [Predefined type](#predefined-type) | | -| `break` | | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/break) | -| `continue` | | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/continue) | -| `class` | [Class declaration/expression](Classes.md) | [Classes](#classes) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes) | -| `const` | [`const` declaration](Variable%20Declarations.md#const-declarations) | [Variable declaration](#variable-declaration) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const) | -| `const enum` | [Forces a const enum](Enums.md) | [User-defined-type modifier](#user-defined-type-modifier) | | -| `configurable` | Can property descriptor be changed | [Property descriptors](#property-descriptors) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | -| `constructor` | [Constructor functions](Classes.md#constructor-functions) | [Classes](#classes) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/constructor) | -| `debugger` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) | -| `declare` | [Ambient declarations](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#12-ambients) | [Environment/modules](#environment-modules) | | -| `default` | Part of `switch...case` | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/default) | -| `default` | [Default exports](Modules.md#default-exports) | [Environment/modules](#environment-modules) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export) | -| `delete` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) | -| `do`...`while` | | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/do...while) | -| `enum` | [Defines a set of named values](Enums.md) | [User-defined type](#user-defined-type) | | -| `enumerable` | Is visible when properties are enumerated | [Property descriptors](#property-descriptors) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | -| `export` | Allow access to elements from outside the [module](Modules.md#export) or [namespace](Namespaces.md#namespacing) | [Environment/modules](#environment-modules) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export) | -| `extends` | [Inheritance](Classes.md#inheritance) | [User-defined-type modifier](#user-defined-type-modifier) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class) | -| `false` | | [Literal](#literal) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) | -| `for` | | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for) | -| `for`...`in` | | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in) | -| `for`...`of` | | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) | -| `from "`_path_`"` | [Location of imported module](Modules.md#import) | [Environment/modules](#environment-modules) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) | -| `function` | [Function declaration](Functions.md#functions) | [Functions](#functions) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function) | -| `get` | Getter | [Property descriptors](#property-descriptors) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | -| `get` | [Getter](Classes.md#accessors) | [Classes](#classes) | | -| `if`...`else` | | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) | -| _class_ `implements` _interface_ | [Class must match the shape of the interface](Interfaces.md#implementing-an-interface) | [User-defined-type modifier](#user-defined-type-modifier) | | -| `import` | [Enable access to exported elements in a module](Modules.md#import) | [Environment/modules](#environment-modules) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) | -| `import` _alias_ `=` _symbol_ | [Define an alias of _symbol_](Namespaces.md#aliases) | [Environment/modules](#environment-modules) | | -| `instanceof` | | [Type operation](#type-operation) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof) | -| `interface` | [Defines a type by its shape (structural typing)](Interfaces.md) | [User-defined type](#user-defined-type) | | -| _parameter_ `is` _type_ | [User-defined type guards](Advanced%20Types.md#user-defined-type-guards) | [Type annotation](#type-annotation) | | -| `let` | [`let` declaration](Variable%20Declarations.md#let-declarations) | [Variable declaration](#variable-declaration) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let) | -| `module` | [Define an ambient module](Modules.md#ambient-modules) | [Environment/modules](#environment-modules) | | -| `namespace` | [Associates the contained elements with the specified namespace](Namespaces.md) | [Environment/modules](#environment-modules) | | -| `never` | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) | [Predefined type](#predefined-type) | | -| `new` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new) | -| `new` | Constructor function type | [Type annotation](#type-annotation) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#389-constructor-type-literals) | -| `null` | | [Literal](#literal) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null) | -| `null` | [`null` type](Basic%20Types.md#null-and-undefined) | [Predefined type](#predefined-type) | | -| `number` | [`number` type](Basic%20Types.md#number) | [Predefined type](#predefined-type) | | -| `private` | [Property can be used only from its containing class](Classes.md#understanding-private) | [Accessibility modifier](#accessibility-modifier) | | -| `protected` | [Property can only be used in its containing class, or by classes which inherit from the containing class](Classes.md#understanding-protected) | [Accessibility modifier](#accessibility-modifier) | | -| `public` | [Property can be used from outside its containing class](Classes.md#public-by-default) | [Accessibility modifier](#accessibility-modifier) | | -| `readonly` | [Property's value can be read, but not written to](Classes.md#readonly-modifier) | [Member modifier](#member-modifier) | | -| `require` | [Import the custom object defined in a module with `export =`](Modules.md#export--and-import--require) | [Environment/modules](#environment-modules) | | -| `return` | | [Functions](#functions) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return) | -| `set` | Setter | [Property descriptors](#property-descriptors) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | -| `set` | [Setter](Classes.md#accessors) | [Classes](#classes) | | -| `static` | [Static properties](Classes.md#static-properties) | [Classes](#classes) | | -| `string` | [`string` type](Basic%20Types.md#string) | [Predefined type](#predefined-type) | | -| `super` | Reference to properties / constructor of the base class | [Classes](#classes) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#49-the-super-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#Super_class_calls_with_super) | -| `switch...case` | | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) | -| `symbol` | [`symbol` type](Symbols.md) | [Predefined type](#predefined-type) | | -| `this` | | [Functions](#functions) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) | -| `this` | Represents the actual type ([derived or implemented](Advanced%20Types.md#polymorphic-this-types)) within a (base) class or interface | [Type annotation](#type-annotation) | | -| `(this: ` _annotation_) | [`this` parameter](Functions.md#this-parameters) | [Functions](#functions) | | -| `this is` _T_ | [`this`-based type guards](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#this-based-type-guards) | [Classes](#classes) | | -| `true` | | [Literal](#literal) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) | -| `try`...`catch`...`finally` | | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) | -| `type` | [Type alias](Advanced%20Types.md#type-aliases) | [User-defined type](#user-defined-type) | | -| `typeof` | | [Type operation](#type-operation) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) | -| `typeof` | Copies the type of an existing identifier | [Type annotation](#type-annotation) | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3810-type-queries) | -| `undefined` | | [Literal](#literal) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined) | -| `undefined` | [`undefined` type](Basic%20Types.md#null-and-undefined) | [Predefined type](#predefined-type) | | -| `value` | Value associated with a property | [Property descriptors](#property-descriptors) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | -| `var` | [`var` declaration](Variable%20Declarations.md#var-declarations) | [Variable declaration](#variable-declaration) | | -| `void` | Evaluates expression but returns `undefined` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void) | -| `void` | [`void` type](Basic%20Types.md#void) | [Predefined type](#predefined-type) | | -| `while` | | [Control flow](#control-flow) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while) | -| `writable` | Can property be written to | [Property descriptors](#property-descriptors) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | -| `yield` | Returns next value of generator function | [Functions](#functions) | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) | +Keyword | Syntax | Description | Category | External links +---|---|---|---|--- +| `abstract` | `abstract class` | [Classes](#classes) | [Abstract classes (cannot be instantiated; must be inherited)](Classes.md#abstract-classes) | | +| `abstract` | `abstract` _member_ | [Classes](#classes) | [Inheriting classes must implement this method/property](Classes.md#abstract-classes) | | +| `any` | | [Predefined type](#predefined-types) | [Describes a type unknown at design time](Basic%20Types.md#any) | | +| `as` | | [Type operation](#type-operation) | [Type assertion](Basic%20Types.md#type-assertions) | | +| `as` | `import {`_item_ `as` _name_`} from "`_path_`"`
`import * as `_name_` from "` _path_ `"` | [Environment/modules](#environment-modules) | [Module import renaming](Modules.md#import) | | +| `as` | `export as namespace` _namespace_ | [Environment/modules](#environment-modules) | [UMD/isomorphic modules](Modules.md#umd-modules) | | +| `async` | | [Functions](#functions) | Marks function as asynchronous | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) | +| `await` | | [Functions](#functions) | Waits for value within an asynchronous function | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) | +| `boolean` | | [Predefined type](#predefined-types) | [`boolean` type](Basic%20Types.md#boolean) | | +| `break` | | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/break) | +| `continue` | | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/continue) | +| `class` | | [Classes](#classes) | [Class declaration/expression](Classes.md) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes) | +| `const` | | [Variable declaration](#variable-declaration) | [`const` declaration](Variable%20Declarations.md#const-declarations) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const) | +| `const` | `const enum` | [User-defined-type modifier](#user-defined-type-modifier) | [Forces a const enum](Enums.md) | | +| `configurable` | | [Property descriptors](#property-descriptors) | Can property descriptor be changed | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| `constructor` | | [Classes](#classes) | [Constructor functions](Classes.md#constructor-functions) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/constructor) | +| `debugger` | | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) | +| `declare` | | [Environment/modules](#environment-modules) | [Ambient declarations](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#12-ambients) | | +| `default` | | [Control flow](#control-flow) | Part of `switch...case` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/default) | +| `default` | `export default` _expr_ | [Environment/modules](#environment-modules) | [Default exports](Modules.md#default-exports) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export) | +| `delete` | | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) | +| `do`...`while` | | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/do...while) | +| `enum` | | [User-defined type](#user-defined-type) | [Defines a set of named values](Enums.md) | | +| `enumerable` | | [Property descriptors](#property-descriptors) | Is visible when properties are enumerated | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| `export` | | [Environment/modules](#environment-modules) | Allow access to elements from outside the [module](Modules.md#export) or [namespace](Namespaces.md#namespacing) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export) | +| `extends` | | [User-defined-type modifier](#user-defined-type-modifier) | [Inheritance](Classes.md#inheritance) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class) | +| `false` | | [Literal](#literal) | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) | +| `for` | | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for) | +| `for`...`in` | | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in) | +| `for`...`of` | | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) | +| `from` | `import` _importExpr_ `from "`_path_`"` | [Environment/modules](#environment-modules) | [Location of imported module](Modules.md#import) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) | +| `function` | | [Functions](#functions) | [Function declaration](Functions.md#functions) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function) | +| `get` | | [Property descriptors](#property-descriptors) | Getter | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| `get` | | [Classes](#classes) | [Getter](Classes.md#accessors) | | +| `if`...`else` | | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) | +| `implements` | _class_ `implements` _interface_ | [User-defined-type modifier](#user-defined-type-modifier) | [Class must match the shape of the interface](Interfaces.md#implementing-an-interface) | | +| `import` | | [Environment/modules](#environment-modules) | [Enable access to a module's exported elements](Modules.md#import) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) | +| `import` | `import` _alias_ `=` _symbol_ | [Environment/modules](#environment-modules) | [Define an alias of _symbol_](Namespaces.md#aliases) | | +| `instanceof` | _expr_ `instanceof` _constructor_ | [Type operation](#type-operation) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof) | +| `interface` | | [User-defined type](#user-defined-type) | [Defines a type by its shape (structural typing)](Interfaces.md) | | +| `is` | _parameter_ `is` _type_ | [Type annotation](#type-annotation) | [User-defined type guards](Advanced%20Types.md#user-defined-type-guards) | | +| `let` | | [Variable declaration](#variable-declaration) | [`let` declaration](Variable%20Declarations.md#let-declarations) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let) | +| `module` | | [Environment/modules](#environment-modules) | [Define an ambient module](Modules.md#ambient-modules) | | +| `namespace` | | [Environment/modules](#environment-modules) | [Associates the contained elements with the specified namespace](Namespaces.md) | | +| `never` | | [Predefined type](#predefined-types) | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) | | +| `new` | | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new) | +| `new` | | [Type annotation](#type-annotation) | Constructor function type | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#389-constructor-type-literals) | +| `null` | | [Literal](#literal) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null) | +| `null` | | [Predefined type](#predefined-types) | [`null` type](Basic%20Types.md#null-and-undefined) | | +| `number` | | [Predefined type](#predefined-types) | [`number` type](Basic%20Types.md#number) | | +| `private` | | [Accessibility modifier](#accessibility-modifier) | [Property can be used only from its containing class](Classes.md#understanding-private) | | +| `protected` | | [Accessibility modifier](#accessibility-modifier) | [Property can only be used in its containing class, or by classes which inherit from the containing class](Classes.md#understanding-protected) | | +| `public` | | [Accessibility modifier](#accessibility-modifier) | [Property can be used from outside its containing class](Classes.md#public-by-default) | | +| `readonly` | | [Member modifier](#member-modifier) | [Property's value can be read, but not written to](Classes.md#readonly-modifier) | | +| `require` | `import` _name_ `= require("`_path_`")` | [Environment/modules](#environment-modules) | [Import the custom object defined in a module with `export =`](Modules.md#export--and-import--require) | | +| `return` | | [Functions](#functions) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return) | +| `set` | | [Property descriptors](#property-descriptors) | Setter | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| `set` | | [Classes](#classes) | [Setter](Classes.md#accessors) | | +| `static` | | [Classes](#classes) | [Static properties](Classes.md#static-properties) | | +| `string` | | [Predefined type](#predefined-types) | [`string` type](Basic%20Types.md#string) | | +| `super` | | [Classes](#classes) | Reference to properties / constructor of the base class | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#49-the-super-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#Super_class_calls_with_super) | +| `switch...case` | | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) | +| `symbol` | | [Predefined type](#predefined-types) | [`symbol` type](Symbols.md) | | +| `this` | | [Functions](#functions) | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) | +| `this` | | [Type annotation](#type-annotation) | Represents the actual type ([derived or implemented](Advanced%20Types.md#polymorphic-this-types)) within a (base) class or interface | | +| `this` | `(this: ` _annotation_) | [Functions](#functions) | [`this` parameter](Functions.md#this-parameters) | | +| `this` | `this is` _T_ | [Classes](#classes) | [`this`-based type guards](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#this-based-type-guards) | | +| `true` | | [Literal](#literal) | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) | +| `try`...`catch`...`finally` | | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) | +| `type` | | [User-defined type](#user-defined-type) | [Type alias](Advanced%20Types.md#type-aliases) | | +| `typeof` | | [Type operation](#type-operation) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) | +| `typeof` | | [Type annotation](#type-annotation) | Copies the type of an existing identifier | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3810-type-queries) | +| `undefined` | | [Literal](#literal) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined) | +| `undefined` | | [Predefined type](#predefined-types) | [`undefined` type](Basic%20Types.md#null-and-undefined) | | +| `value` | | [Property descriptors](#property-descriptors) | Value associated with a property | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| `var` | | [Variable declaration](#variable-declaration) | [`var` declaration](Variable%20Declarations.md#var-declarations) | | +| `void` | | | Evaluates expression but returns `undefined` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void) | +| `void` | | [Predefined type](#predefined-types) | [`void` type](Basic%20Types.md#void) | | +| `while` | | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while) | +| `writable` | | [Property descriptors](#property-descriptors) | Can property be written to | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| `yield` | | [Functions](#functions) | Returns next value of generator function | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) | --- ### By category -Category | Keyword | Description | External links ----|---|---|--- -|
Literal
| `false` | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) | -| Literal | `null` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null) | -| Literal | `true` | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) | -| Literal | `undefined` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined) | -|
Variable declaration
| `const` | [`const` declaration](Variable%20Declarations.md#const-declarations) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const) | -| Variable declaration | `let` | [`let` declaration](Variable%20Declarations.md#let-declarations) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let) | -| Variable declaration | `var` | [`var` declaration](Variable%20Declarations.md#var-declarations) | | -|
Control flow
| `break` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/break) | -| Control flow | `continue` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/continue) | -| Control flow | `default` | Part of `switch...case` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/default) | -| Control flow | `do`...`while` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/do...while) | -| Control flow | `for` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for) | -| Control flow | `for`...`in` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in) | -| Control flow | `for`...`of` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) | -| Control flow | `if`...`else` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) | -| Control flow | `switch...case` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) | -| Control flow | `try`...`catch`...`finally` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) | -| Control flow | `while` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while) | -|
Functions
| `(this: ` _annotation_) | [`this` parameter](Functions.md#this-parameters) | | -| Functions | `async` | Marks function as asynchronous | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) | -| Functions | `await` | Waits for value within an asynchronous function | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) | -| Functions | `function` | [Function declaration](Functions.md#functions) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function) | -| Functions | `return` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return) | -| Functions | `this` | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) | -| Functions | `yield` | Returns next value of generator function | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) | -|
Property descriptors
| `configurable` | Can property descriptor be changed | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | -| Property descriptors | `enumerable` | Is visible when properties are enumerated | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | -| Property descriptors | `get` | Getter | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | -| Property descriptors | `set` | Setter | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | -| Property descriptors | `value` | Value associated with a property | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | -| Property descriptors | `writable` | Can property be written to | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | -| | `debugger` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) | -| | `delete` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) | -| | `new` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new) | -| | `void` | Evaluates expression but returns `undefined` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void) | -|
Predefined type
| `any` | [Describes a type unknown at design time](Basic%20Types.md#any) | | -| Predefined type | `boolean` | [`boolean` type](Basic%20Types.md#boolean) | | -| Predefined type | `never` | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) | | -| Predefined type | `null` | [`null` type](Basic%20Types.md#null-and-undefined) | | -| Predefined type | `number` | [`number` type](Basic%20Types.md#number) | | -| Predefined type | `string` | [`string` type](Basic%20Types.md#string) | | -| Predefined type | `symbol` | [`symbol` type](Symbols.md) | | -| Predefined type | `undefined` | [`undefined` type](Basic%20Types.md#null-and-undefined) | | -| Predefined type | `void` | [`void` type](Basic%20Types.md#void) | | -|
Type annotation
| _parameter_ `is` _type_ | [User-defined type guards](Advanced%20Types.md#user-defined-type-guards) | | -| Type annotation | `new` | Constructor function type | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#389-constructor-type-literals) | -| Type annotation | `this` | Represents the actual type ([derived or implemented](Advanced%20Types.md#polymorphic-this-types)) within a (base) class or interface | | -| Type annotation | `typeof` | Copies the type of an existing identifier | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3810-type-queries) | -|
Type operation
| `as` | [Type assertion](Basic%20Types.md#type-assertions) | | -| Type operation | `instanceof` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof) | -| Type operation | `typeof` | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) | -|
Environment/modules
| `as` | [Module import renaming](Modules.md#import) | | -| Environment/modules | `declare` | [Ambient declarations](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#12-ambients) | | -| Environment/modules | `default` | [Default exports](Modules.md#default-exports) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export) | -| Environment/modules | `export` | Allow access to elements from outside the [module](Modules.md#export) or [namespace](Namespaces.md#namespacing) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export) | -| Environment/modules | `from "`_path_`"` | [Location of imported module](Modules.md#import) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) | -| Environment/modules | `import` | [Enable access to exported elements in a module](Modules.md#import) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) | -| Environment/modules | `import` _alias_ `=` _symbol_ | [Define an alias of _symbol_](Namespaces.md#aliases) | | -| Environment/modules | `module` | [Define an ambient module](Modules.md#ambient-modules) | | -| Environment/modules | `namespace` | [Associates the contained elements with the specified namespace](Namespaces.md) | | -| Environment/modules | `require` | [Import the custom object defined in a module with `export =`](Modules.md#export--and-import--require) | | -|
User-defined type
| `enum` | [Defines a set of named values](Enums.md) | | -| User-defined type | `interface` | [Defines a type by its shape (structural typing)](Interfaces.md) | | -| User-defined type | `type` | [Type alias](Advanced%20Types.md#type-aliases) | | -|
User-defined-type modifier
| _class_ `implements` _interface_ | [Class must match the shape of the interface](Interfaces.md#implementing-an-interface) | | -| User-defined-type modifier | `const enum` | [Forces a const enum](Enums.md) | | -| User-defined-type modifier | `extends` | [Inheritance](Classes.md#inheritance) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class) | -|
Classes
| `abstract class` | [Abstract classes (cannot be instantiated; must be inherited)](Classes.md#abstract-classes) | | -| Classes | `abstract` _member_ | [Inheriting classes must implement this method/property](Classes.md#abstract-classes) | | -| Classes | `class` | [Class declaration/expression](Classes.md) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes) | -| Classes | `constructor` | [Constructor functions](Classes.md#constructor-functions) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/constructor) | -| Classes | `get` | [Getter](Classes.md#accessors) | | -| Classes | `set` | [Setter](Classes.md#accessors) | | -| Classes | `static` | [Static properties](Classes.md#static-properties) | | -| Classes | `super` | Reference to properties / constructor of the base class | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#49-the-super-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#Super_class_calls_with_super) | -| Classes | `this is` _T_ | [`this`-based type guards](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#this-based-type-guards) | | -|
Accessibility modifier
| `private` | [Property can be used only from its containing class](Classes.md#understanding-private) | | -| Accessibility modifier | `protected` | [Property can only be used in its containing class, or by classes which inherit from the containing class](Classes.md#understanding-protected) | | -| Accessibility modifier | `public` | [Property can be used from outside its containing class](Classes.md#public-by-default) | | -|
Member modifier
| `readonly` | [Property's value can be read, but not written to](Classes.md#readonly-modifier) | | \ No newline at end of file +Category | Keyword | Syntax | Description | External links +---|---|---|---|--- +|
Literal
| `false` | | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) | +| Literal | `null` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null) | +| Literal | `true` | | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#322-the-boolean-type) | +| Literal | `undefined` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined) | +|
Variable declaration
| `const` | | [`const` declaration](Variable%20Declarations.md#const-declarations) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const) | +| Variable declaration | `let` | | [`let` declaration](Variable%20Declarations.md#let-declarations) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let) | +| Variable declaration | `var` | | [`var` declaration](Variable%20Declarations.md#var-declarations) | | +|
Control flow
| `break` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/break) | +| Control flow | `continue` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/continue) | +| Control flow | `default` | | Part of `switch...case` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/default) | +| Control flow | `do`...`while` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/do...while) | +| Control flow | `for` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for) | +| Control flow | `for`...`in` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in) | +| Control flow | `for`...`of` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) | +| Control flow | `if`...`else` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) | +| Control flow | `switch...case` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) | +| Control flow | `try`...`catch`...`finally` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) | +| Control flow | `while` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while) | +|
Functions
| `async` | | Marks function as asynchronous | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) | +| Functions | `await` | | Waits for value within an asynchronous function | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) | +| Functions | `function` | | [Function declaration](Functions.md#functions) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function) | +| Functions | `return` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return) | +| Functions | `this` | | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) | +| Functions | `this` | `(this: ` _annotation_) | [`this` parameter](Functions.md#this-parameters) | | +| Functions | `yield` | | Returns next value of generator function | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) | +|
Property descriptors
| `configurable` | | Can property descriptor be changed | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| Property descriptors | `enumerable` | | Is visible when properties are enumerated | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| Property descriptors | `get` | | Getter | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| Property descriptors | `set` | | Setter | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| Property descriptors | `value` | | Value associated with a property | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| Property descriptors | `writable` | | Can property be written to | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | +| | `debugger` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) | +| | `delete` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) | +| | `new` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new) | +| | `void` | | Evaluates expression but returns `undefined` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void) | +|
Predefined type
| `any` | | [Describes a type unknown at design time](Basic%20Types.md#any) | | +| Predefined type | `boolean` | | [`boolean` type](Basic%20Types.md#boolean) | | +| Predefined type | `never` | | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) | | +| Predefined type | `null` | | [`null` type](Basic%20Types.md#null-and-undefined) | | +| Predefined type | `number` | | [`number` type](Basic%20Types.md#number) | | +| Predefined type | `string` | | [`string` type](Basic%20Types.md#string) | | +| Predefined type | `symbol` | | [`symbol` type](Symbols.md) | | +| Predefined type | `undefined` | | [`undefined` type](Basic%20Types.md#null-and-undefined) | | +| Predefined type | `void` | | [`void` type](Basic%20Types.md#void) | | +|
Type annotation
| `is` | _parameter_ `is` _type_ | [User-defined type guards](Advanced%20Types.md#user-defined-type-guards) | | +| Type annotation | `new` | | Constructor function type | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#389-constructor-type-literals) | +| Type annotation | `this` | | Represents the actual type ([derived or implemented](Advanced%20Types.md#polymorphic-this-types)) within a (base) class or interface | | +| Type annotation | `typeof` | | Copies the type of an existing identifier | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3810-type-queries) | +|
Type operation
| `as` | | [Type assertion](Basic%20Types.md#type-assertions) | | +| Type operation | `instanceof` | _expr_ `instanceof` _constructor_ | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof) | +| Type operation | `typeof` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) | +|
Environment/modules
| `as` | `import {`_item_ `as` _name_`} from "`_path_`"`
`import * as `_name_` from "` _path_ `"` | [Module import renaming](Modules.md#import) | | +| Environment/modules | `as` | `export as namespace` _namespace_ | [UMD/isomorphic modules](Modules.md#umd-modules) | | +| Environment/modules | `declare` | | [Ambient declarations](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#12-ambients) | | +| Environment/modules | `default` | `export default` _expr_ | [Default exports](Modules.md#default-exports) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export) | +| Environment/modules | `export` | | Allow access to elements from outside the [module](Modules.md#export) or [namespace](Namespaces.md#namespacing) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export) | +| Environment/modules | `from` | `import` _importExpr_ `from "`_path_`"` | [Location of imported module](Modules.md#import) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) | +| Environment/modules | `import` | | [Enable access to a module's exported elements](Modules.md#import) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) | +| Environment/modules | `import` | `import` _alias_ `=` _symbol_ | [Define an alias of _symbol_](Namespaces.md#aliases) | | +| Environment/modules | `module` | | [Define an ambient module](Modules.md#ambient-modules) | | +| Environment/modules | `namespace` | | [Associates the contained elements with the specified namespace](Namespaces.md) | | +| Environment/modules | `require` | `import` _name_ `= require("`_path_`")` | [Import the custom object defined in a module with `export =`](Modules.md#export--and-import--require) | | +|
User-defined type
| `enum` | | [Defines a set of named values](Enums.md) | | +| User-defined type | `interface` | | [Defines a type by its shape (structural typing)](Interfaces.md) | | +| User-defined type | `type` | | [Type alias](Advanced%20Types.md#type-aliases) | | +|
User-defined-type modifier
| `const` | `const enum` | [Forces a const enum](Enums.md) | | +| User-defined-type modifier | `extends` | | [Inheritance](Classes.md#inheritance) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class) | +| User-defined-type modifier | `implements` | _class_ `implements` _interface_ | [Class must match the shape of the interface](Interfaces.md#implementing-an-interface) | | +|
Classes
| `abstract` | `abstract class` | [Abstract classes (cannot be instantiated; must be inherited)](Classes.md#abstract-classes) | | +| Classes | `abstract` | `abstract` _member_ | [Inheriting classes must implement this method/property](Classes.md#abstract-classes) | | +| Classes | `class` | | [Class declaration/expression](Classes.md) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes) | +| Classes | `constructor` | | [Constructor functions](Classes.md#constructor-functions) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/constructor) | +| Classes | `get` | | [Getter](Classes.md#accessors) | | +| Classes | `set` | | [Setter](Classes.md#accessors) | | +| Classes | `static` | | [Static properties](Classes.md#static-properties) | | +| Classes | `super` | | Reference to properties / constructor of the base class | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#49-the-super-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#Super_class_calls_with_super) | +| Classes | `this` | `this is` _T_ | [`this`-based type guards](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#this-based-type-guards) | | +|
Accessibility modifier
| `private` | | [Property can be used only from its containing class](Classes.md#understanding-private) | | +| Accessibility modifier | `protected` | | [Property can only be used in its containing class, or by classes which inherit from the containing class](Classes.md#understanding-protected) | | +| Accessibility modifier | `public` | | [Property can be used from outside its containing class](Classes.md#public-by-default) | | +|
Member modifier
| `readonly` | | [Property's value can be read, but not written to](Classes.md#readonly-modifier) | | \ No newline at end of file From 3bab20653c41e80f3353d2998c9983e2b44dd660 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Wed, 7 Sep 2016 02:59:12 +0200 Subject: [PATCH 44/45] Predefined type -> primitive type --- pages/Keywords.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index 1e2805de8..c4aa972dc 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -1,16 +1,16 @@ # Keywords -Keyword | Syntax | Description | Category | External links +Keyword | Syntax | Category | Description | External links ---|---|---|---|--- | `abstract` | `abstract class` | [Classes](#classes) | [Abstract classes (cannot be instantiated; must be inherited)](Classes.md#abstract-classes) | | | `abstract` | `abstract` _member_ | [Classes](#classes) | [Inheriting classes must implement this method/property](Classes.md#abstract-classes) | | -| `any` | | [Predefined type](#predefined-types) | [Describes a type unknown at design time](Basic%20Types.md#any) | | +| `any` | | [Primitive type](#primitive-types) | [Describes a type unknown at design time](Basic%20Types.md#any) | | | `as` | | [Type operation](#type-operation) | [Type assertion](Basic%20Types.md#type-assertions) | | | `as` | `import {`_item_ `as` _name_`} from "`_path_`"`
`import * as `_name_` from "` _path_ `"` | [Environment/modules](#environment-modules) | [Module import renaming](Modules.md#import) | | | `as` | `export as namespace` _namespace_ | [Environment/modules](#environment-modules) | [UMD/isomorphic modules](Modules.md#umd-modules) | | | `async` | | [Functions](#functions) | Marks function as asynchronous | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) | | `await` | | [Functions](#functions) | Waits for value within an asynchronous function | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) | -| `boolean` | | [Predefined type](#predefined-types) | [`boolean` type](Basic%20Types.md#boolean) | | +| `boolean` | | [Primitive type](#primitive-types) | [`boolean` type](Basic%20Types.md#boolean) | | | `break` | | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/break) | | `continue` | | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/continue) | | `class` | | [Classes](#classes) | [Class declaration/expression](Classes.md) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes) | @@ -46,12 +46,12 @@ Keyword | Syntax | Description | Category | External links | `let` | | [Variable declaration](#variable-declaration) | [`let` declaration](Variable%20Declarations.md#let-declarations) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let) | | `module` | | [Environment/modules](#environment-modules) | [Define an ambient module](Modules.md#ambient-modules) | | | `namespace` | | [Environment/modules](#environment-modules) | [Associates the contained elements with the specified namespace](Namespaces.md) | | -| `never` | | [Predefined type](#predefined-types) | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) | | +| `never` | | [Primitive type](#primitive-types) | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) | | | `new` | | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new) | | `new` | | [Type annotation](#type-annotation) | Constructor function type | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#389-constructor-type-literals) | | `null` | | [Literal](#literal) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null) | -| `null` | | [Predefined type](#predefined-types) | [`null` type](Basic%20Types.md#null-and-undefined) | | -| `number` | | [Predefined type](#predefined-types) | [`number` type](Basic%20Types.md#number) | | +| `null` | | [Primitive type](#primitive-types) | [`null` type](Basic%20Types.md#null-and-undefined) | | +| `number` | | [Primitive type](#primitive-types) | [`number` type](Basic%20Types.md#number) | | | `private` | | [Accessibility modifier](#accessibility-modifier) | [Property can be used only from its containing class](Classes.md#understanding-private) | | | `protected` | | [Accessibility modifier](#accessibility-modifier) | [Property can only be used in its containing class, or by classes which inherit from the containing class](Classes.md#understanding-protected) | | | `public` | | [Accessibility modifier](#accessibility-modifier) | [Property can be used from outside its containing class](Classes.md#public-by-default) | | @@ -61,10 +61,10 @@ Keyword | Syntax | Description | Category | External links | `set` | | [Property descriptors](#property-descriptors) | Setter | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | | `set` | | [Classes](#classes) | [Setter](Classes.md#accessors) | | | `static` | | [Classes](#classes) | [Static properties](Classes.md#static-properties) | | -| `string` | | [Predefined type](#predefined-types) | [`string` type](Basic%20Types.md#string) | | +| `string` | | [Primitive type](#primitive-types) | [`string` type](Basic%20Types.md#string) | | | `super` | | [Classes](#classes) | Reference to properties / constructor of the base class | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#49-the-super-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#Super_class_calls_with_super) | | `switch...case` | | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) | -| `symbol` | | [Predefined type](#predefined-types) | [`symbol` type](Symbols.md) | | +| `symbol` | | [Primitive type](#primitive-types) | [`symbol` type](Symbols.md) | | | `this` | | [Functions](#functions) | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) | | `this` | | [Type annotation](#type-annotation) | Represents the actual type ([derived or implemented](Advanced%20Types.md#polymorphic-this-types)) within a (base) class or interface | | | `this` | `(this: ` _annotation_) | [Functions](#functions) | [`this` parameter](Functions.md#this-parameters) | | @@ -75,11 +75,11 @@ Keyword | Syntax | Description | Category | External links | `typeof` | | [Type operation](#type-operation) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) | | `typeof` | | [Type annotation](#type-annotation) | Copies the type of an existing identifier | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3810-type-queries) | | `undefined` | | [Literal](#literal) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined) | -| `undefined` | | [Predefined type](#predefined-types) | [`undefined` type](Basic%20Types.md#null-and-undefined) | | +| `undefined` | | [Primitive type](#primitive-types) | [`undefined` type](Basic%20Types.md#null-and-undefined) | | | `value` | | [Property descriptors](#property-descriptors) | Value associated with a property | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | | `var` | | [Variable declaration](#variable-declaration) | [`var` declaration](Variable%20Declarations.md#var-declarations) | | | `void` | | | Evaluates expression but returns `undefined` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void) | -| `void` | | [Predefined type](#predefined-types) | [`void` type](Basic%20Types.md#void) | | +| `void` | | [Primitive type](#primitive-types) | [`void` type](Basic%20Types.md#void) | | | `while` | | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while) | | `writable` | | [Property descriptors](#property-descriptors) | Can property be written to | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | | `yield` | | [Functions](#functions) | Returns next value of generator function | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) | @@ -125,15 +125,15 @@ Category | Keyword | Syntax | Description | External links | | `delete` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) | | | `new` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new) | | | `void` | | Evaluates expression but returns `undefined` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void) | -|
Predefined type
| `any` | | [Describes a type unknown at design time](Basic%20Types.md#any) | | -| Predefined type | `boolean` | | [`boolean` type](Basic%20Types.md#boolean) | | -| Predefined type | `never` | | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) | | -| Predefined type | `null` | | [`null` type](Basic%20Types.md#null-and-undefined) | | -| Predefined type | `number` | | [`number` type](Basic%20Types.md#number) | | -| Predefined type | `string` | | [`string` type](Basic%20Types.md#string) | | -| Predefined type | `symbol` | | [`symbol` type](Symbols.md) | | -| Predefined type | `undefined` | | [`undefined` type](Basic%20Types.md#null-and-undefined) | | -| Predefined type | `void` | | [`void` type](Basic%20Types.md#void) | | +|
Primitive type
| `any` | | [Describes a type unknown at design time](Basic%20Types.md#any) | | +| Primitive type | `boolean` | | [`boolean` type](Basic%20Types.md#boolean) | | +| Primitive type | `never` | | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) | | +| Primitive type | `null` | | [`null` type](Basic%20Types.md#null-and-undefined) | | +| Primitive type | `number` | | [`number` type](Basic%20Types.md#number) | | +| Primitive type | `string` | | [`string` type](Basic%20Types.md#string) | | +| Primitive type | `symbol` | | [`symbol` type](Symbols.md) | | +| Primitive type | `undefined` | | [`undefined` type](Basic%20Types.md#null-and-undefined) | | +| Primitive type | `void` | | [`void` type](Basic%20Types.md#void) | | |
Type annotation
| `is` | _parameter_ `is` _type_ | [User-defined type guards](Advanced%20Types.md#user-defined-type-guards) | | | Type annotation | `new` | | Constructor function type | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#389-constructor-type-literals) | | Type annotation | `this` | | Represents the actual type ([derived or implemented](Advanced%20Types.md#polymorphic-this-types)) within a (base) class or interface | | From 8b54c8ddc6bd82556aa2b187583b15497d7e93b5 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Wed, 7 Sep 2016 03:13:35 +0200 Subject: [PATCH 45/45] Pluralize primitive types --- pages/Keywords.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/pages/Keywords.md b/pages/Keywords.md index c4aa972dc..a827b8745 100644 --- a/pages/Keywords.md +++ b/pages/Keywords.md @@ -4,13 +4,13 @@ Keyword | Syntax | Category | Description | External links ---|---|---|---|--- | `abstract` | `abstract class` | [Classes](#classes) | [Abstract classes (cannot be instantiated; must be inherited)](Classes.md#abstract-classes) | | | `abstract` | `abstract` _member_ | [Classes](#classes) | [Inheriting classes must implement this method/property](Classes.md#abstract-classes) | | -| `any` | | [Primitive type](#primitive-types) | [Describes a type unknown at design time](Basic%20Types.md#any) | | +| `any` | | [Primitive types](#primitive-types) | [Describes a type unknown at design time](Basic%20Types.md#any) | | | `as` | | [Type operation](#type-operation) | [Type assertion](Basic%20Types.md#type-assertions) | | | `as` | `import {`_item_ `as` _name_`} from "`_path_`"`
`import * as `_name_` from "` _path_ `"` | [Environment/modules](#environment-modules) | [Module import renaming](Modules.md#import) | | | `as` | `export as namespace` _namespace_ | [Environment/modules](#environment-modules) | [UMD/isomorphic modules](Modules.md#umd-modules) | | | `async` | | [Functions](#functions) | Marks function as asynchronous | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) | | `await` | | [Functions](#functions) | Waits for value within an asynchronous function | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) | -| `boolean` | | [Primitive type](#primitive-types) | [`boolean` type](Basic%20Types.md#boolean) | | +| `boolean` | | [Primitive types](#primitive-types) | [`boolean` type](Basic%20Types.md#boolean) | | | `break` | | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/break) | | `continue` | | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/continue) | | `class` | | [Classes](#classes) | [Class declaration/expression](Classes.md) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes) | @@ -46,12 +46,12 @@ Keyword | Syntax | Category | Description | External links | `let` | | [Variable declaration](#variable-declaration) | [`let` declaration](Variable%20Declarations.md#let-declarations) | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let) | | `module` | | [Environment/modules](#environment-modules) | [Define an ambient module](Modules.md#ambient-modules) | | | `namespace` | | [Environment/modules](#environment-modules) | [Associates the contained elements with the specified namespace](Namespaces.md) | | -| `never` | | [Primitive type](#primitive-types) | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) | | +| `never` | | [Primitive types](#primitive-types) | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) | | | `new` | | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new) | | `new` | | [Type annotation](#type-annotation) | Constructor function type | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#389-constructor-type-literals) | | `null` | | [Literal](#literal) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null) | -| `null` | | [Primitive type](#primitive-types) | [`null` type](Basic%20Types.md#null-and-undefined) | | -| `number` | | [Primitive type](#primitive-types) | [`number` type](Basic%20Types.md#number) | | +| `null` | | [Primitive types](#primitive-types) | [`null` type](Basic%20Types.md#null-and-undefined) | | +| `number` | | [Primitive types](#primitive-types) | [`number` type](Basic%20Types.md#number) | | | `private` | | [Accessibility modifier](#accessibility-modifier) | [Property can be used only from its containing class](Classes.md#understanding-private) | | | `protected` | | [Accessibility modifier](#accessibility-modifier) | [Property can only be used in its containing class, or by classes which inherit from the containing class](Classes.md#understanding-protected) | | | `public` | | [Accessibility modifier](#accessibility-modifier) | [Property can be used from outside its containing class](Classes.md#public-by-default) | | @@ -61,10 +61,10 @@ Keyword | Syntax | Category | Description | External links | `set` | | [Property descriptors](#property-descriptors) | Setter | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | | `set` | | [Classes](#classes) | [Setter](Classes.md#accessors) | | | `static` | | [Classes](#classes) | [Static properties](Classes.md#static-properties) | | -| `string` | | [Primitive type](#primitive-types) | [`string` type](Basic%20Types.md#string) | | +| `string` | | [Primitive types](#primitive-types) | [`string` type](Basic%20Types.md#string) | | | `super` | | [Classes](#classes) | Reference to properties / constructor of the base class | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#49-the-super-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#Super_class_calls_with_super) | | `switch...case` | | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch) | -| `symbol` | | [Primitive type](#primitive-types) | [`symbol` type](Symbols.md) | | +| `symbol` | | [Primitive types](#primitive-types) | [`symbol` type](Symbols.md) | | | `this` | | [Functions](#functions) | | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#42-the-this-keyword), [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) | | `this` | | [Type annotation](#type-annotation) | Represents the actual type ([derived or implemented](Advanced%20Types.md#polymorphic-this-types)) within a (base) class or interface | | | `this` | `(this: ` _annotation_) | [Functions](#functions) | [`this` parameter](Functions.md#this-parameters) | | @@ -75,11 +75,11 @@ Keyword | Syntax | Category | Description | External links | `typeof` | | [Type operation](#type-operation) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) | | `typeof` | | [Type annotation](#type-annotation) | Copies the type of an existing identifier | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3810-type-queries) | | `undefined` | | [Literal](#literal) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined) | -| `undefined` | | [Primitive type](#primitive-types) | [`undefined` type](Basic%20Types.md#null-and-undefined) | | +| `undefined` | | [Primitive types](#primitive-types) | [`undefined` type](Basic%20Types.md#null-and-undefined) | | | `value` | | [Property descriptors](#property-descriptors) | Value associated with a property | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | | `var` | | [Variable declaration](#variable-declaration) | [`var` declaration](Variable%20Declarations.md#var-declarations) | | | `void` | | | Evaluates expression but returns `undefined` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void) | -| `void` | | [Primitive type](#primitive-types) | [`void` type](Basic%20Types.md#void) | | +| `void` | | [Primitive types](#primitive-types) | [`void` type](Basic%20Types.md#void) | | | `while` | | [Control flow](#control-flow) | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while) | | `writable` | | [Property descriptors](#property-descriptors) | Can property be written to | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) | | `yield` | | [Functions](#functions) | Returns next value of generator function | [PR#2783](https://github.com/Microsoft/TypeScript/issues/2873), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#67-generator-functions) | @@ -125,15 +125,15 @@ Category | Keyword | Syntax | Description | External links | | `delete` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete) | | | `new` | | | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new) | | | `void` | | Evaluates expression but returns `undefined` | [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void) | -|
Primitive type
| `any` | | [Describes a type unknown at design time](Basic%20Types.md#any) | | -| Primitive type | `boolean` | | [`boolean` type](Basic%20Types.md#boolean) | | -| Primitive type | `never` | | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) | | -| Primitive type | `null` | | [`null` type](Basic%20Types.md#null-and-undefined) | | -| Primitive type | `number` | | [`number` type](Basic%20Types.md#number) | | -| Primitive type | `string` | | [`string` type](Basic%20Types.md#string) | | -| Primitive type | `symbol` | | [`symbol` type](Symbols.md) | | -| Primitive type | `undefined` | | [`undefined` type](Basic%20Types.md#null-and-undefined) | | -| Primitive type | `void` | | [`void` type](Basic%20Types.md#void) | | +|
Primitive types
| `any` | | [Describes a type unknown at design time](Basic%20Types.md#any) | | +| Primitive types | `boolean` | | [`boolean` type](Basic%20Types.md#boolean) | | +| Primitive types | `never` | | [`never` type](https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#the-never-type) | | +| Primitive types | `null` | | [`null` type](Basic%20Types.md#null-and-undefined) | | +| Primitive types | `number` | | [`number` type](Basic%20Types.md#number) | | +| Primitive types | `string` | | [`string` type](Basic%20Types.md#string) | | +| Primitive types | `symbol` | | [`symbol` type](Symbols.md) | | +| Primitive types | `undefined` | | [`undefined` type](Basic%20Types.md#null-and-undefined) | | +| Primitive types | `void` | | [`void` type](Basic%20Types.md#void) | | |
Type annotation
| `is` | _parameter_ `is` _type_ | [User-defined type guards](Advanced%20Types.md#user-defined-type-guards) | | | Type annotation | `new` | | Constructor function type | [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#389-constructor-type-literals) | | Type annotation | `this` | | Represents the actual type ([derived or implemented](Advanced%20Types.md#polymorphic-this-types)) within a (base) class or interface | |