Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Create Keywords.md #344

Closed
wants to merge 51 commits into from
Closed
Changes from 5 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
31fff55
Add link to templates directory
mhegazy Jul 8, 2016
e8bcd2e
Make link to templates absolute
mhegazy Jul 8, 2016
98e1033
fixes typos
Jul 11, 2016
1e4bb08
fixes typo
Jul 11, 2016
df1296a
Merge pull request #338 from blacknight811/master
mhegazy Jul 11, 2016
bda7975
Fixed code typo in Modules.md
nippur72 Jul 13, 2016
5900976
Merge pull request #340 from nippur72/patch-1
mhegazy Jul 14, 2016
b628e33
Create Keywords.md
zspitz Jul 17, 2016
bee295f
Update Keywords.md
zspitz Jul 17, 2016
e111598
Update Keywords.md
zspitz Jul 17, 2016
f258174
lowercase type names, relative URLs
zspitz Jul 17, 2016
e3aaf09
Update Keywords.md
zspitz Jul 17, 2016
3c23ce8
Alphabetical order, and single list
zspitz Jul 18, 2016
3110858
Fixed broken lowercase links to Handbook
zspitz Jul 18, 2016
e11fa2f
Update Keywords.md
zspitz Jul 18, 2016
67e33c8
Added code formatting to keywords
zspitz Jul 18, 2016
ab67fa5
Added polymorphic `this` types and `this` function parameters
zspitz Jul 19, 2016
102a30f
Update Keywords.md
zspitz Jul 19, 2016
0bb4aeb
Added link - user-defined type guards
zspitz Jul 19, 2016
3fa50b8
Update Keywords.md
zspitz Jul 19, 2016
d87c35e
Fixed space in link line 53
zspitz Jul 19, 2016
eb2b912
Update Keywords.md
zspitz Jul 19, 2016
9f05002
Merge pull request #1 from Microsoft/release-2.0
zspitz Jul 19, 2016
10ddd2d
Link test
zspitz Jul 19, 2016
cbbd49f
Added category view
zspitz Jul 19, 2016
d17b9cf
Category link test
zspitz Jul 19, 2016
3bc3d30
Added links to category view
zspitz Jul 19, 2016
6e4906e
Fix double-blank line
zspitz Jul 19, 2016
345a6b1
Added `export` for namespaces
zspitz Jul 19, 2016
35a0bc1
Added `new` and `typeof` type annotation
zspitz Jul 20, 2016
1e4b6e5
Fix for test
zspitz Jul 20, 2016
12788c7
Add instructions on how to read the handbook.
jish Jul 21, 2016
632d8aa
Adhere to one sentence per line style guide.
jish Jul 21, 2016
35171f8
Merge pull request #351 from jish/where-to-read
DanielRosenwasser Jul 21, 2016
4826c50
Update README.md
DanielRosenwasser Jul 21, 2016
d654783
Remove uses of `null` as default value for flags
mhegazy Jul 24, 2016
6e834cd
Make default more explicit.
DanielRosenwasser Jul 25, 2016
8550e42
Separate external links column; property descriptor keywords
zspitz Aug 1, 2016
58a74c9
Reordered property descriptor keywords
zspitz Aug 1, 2016
6f7766c
Reordered category column after description
zspitz Aug 1, 2016
8eae732
Fixed empty links; categroixed yield with functions
zspitz Aug 1, 2016
eb5f8b4
Fixed configurable description
zspitz Aug 1, 2016
b2ef743
Fixed constructor link
zspitz Aug 1, 2016
6d4c103
Moved some spec links to external links column
zspitz Aug 4, 2016
7d50922
Merge pull request #2 from Microsoft/master
zspitz Aug 4, 2016
70f41dd
Fixed this-parameter link to Handbook
zspitz Aug 4, 2016
1241695
Fixed polymorphic this-type link
zspitz Aug 4, 2016
6d06909
Merge remote-tracking branch 'refs/remotes/origin/master'
zspitz Aug 4, 2016
99ab9ee
Added Syntax column
zspitz Aug 11, 2016
3bab206
Predefined type -> primitive type
zspitz Sep 7, 2016
8b54c8d
Pluralize primitive types
zspitz Sep 7, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
99 changes: 99 additions & 0 deletions pages/Keywords.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# 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](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
---|---|---
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)

---

Unknown:

Keyword |
---|
of|
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for-of

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

package|