This repository has been archived by the owner on Oct 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Create Keywords.md #344
Closed
Closed
Create Keywords.md #344
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 e8bcd2e
Make link to templates absolute
mhegazy 98e1033
fixes typos
1e4bb08
fixes typo
df1296a
Merge pull request #338 from blacknight811/master
mhegazy bda7975
Fixed code typo in Modules.md
nippur72 5900976
Merge pull request #340 from nippur72/patch-1
mhegazy b628e33
Create Keywords.md
zspitz bee295f
Update Keywords.md
zspitz e111598
Update Keywords.md
zspitz f258174
lowercase type names, relative URLs
zspitz e3aaf09
Update Keywords.md
zspitz 3c23ce8
Alphabetical order, and single list
zspitz 3110858
Fixed broken lowercase links to Handbook
zspitz e11fa2f
Update Keywords.md
zspitz 67e33c8
Added code formatting to keywords
zspitz ab67fa5
Added polymorphic `this` types and `this` function parameters
zspitz 102a30f
Update Keywords.md
zspitz 0bb4aeb
Added link - user-defined type guards
zspitz 3fa50b8
Update Keywords.md
zspitz d87c35e
Fixed space in link line 53
zspitz eb2b912
Update Keywords.md
zspitz 9f05002
Merge pull request #1 from Microsoft/release-2.0
zspitz 10ddd2d
Link test
zspitz cbbd49f
Added category view
zspitz d17b9cf
Category link test
zspitz 3bc3d30
Added links to category view
zspitz 6e4906e
Fix double-blank line
zspitz 345a6b1
Added `export` for namespaces
zspitz 35a0bc1
Added `new` and `typeof` type annotation
zspitz 1e4b6e5
Fix for test
zspitz 12788c7
Add instructions on how to read the handbook.
jish 632d8aa
Adhere to one sentence per line style guide.
jish 35171f8
Merge pull request #351 from jish/where-to-read
DanielRosenwasser 4826c50
Update README.md
DanielRosenwasser d654783
Remove uses of `null` as default value for flags
mhegazy 6e834cd
Make default more explicit.
DanielRosenwasser 8550e42
Separate external links column; property descriptor keywords
zspitz 58a74c9
Reordered property descriptor keywords
zspitz 6f7766c
Reordered category column after description
zspitz 8eae732
Fixed empty links; categroixed yield with functions
zspitz eb5f8b4
Fixed configurable description
zspitz b2ef743
Fixed constructor link
zspitz 6d4c103
Moved some spec links to external links column
zspitz 7d50922
Merge pull request #2 from Microsoft/master
zspitz 70f41dd
Fixed this-parameter link to Handbook
zspitz 1241695
Fixed polymorphic this-type link
zspitz 6d06909
Merge remote-tracking branch 'refs/remotes/origin/master'
zspitz 99ab9ee
Added Syntax column
zspitz 3bab206
Predefined type -> primitive type
zspitz 8b54c8d
Pluralize primitive types
zspitz File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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| | ||
package| |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for-of
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DanielRosenwasser fixed