23.06.2015 Views

TypeScript Language Specification v1.5

TypeScript Language Specification v1.5

TypeScript Language Specification v1.5

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

A Grammar<br />

This appendix contains a summary of the grammar found in the main document. As described in section<br />

2.1, the <strong>TypeScript</strong> grammar is a superset of the grammar defined in the ECMAScript <strong>Language</strong><br />

<strong>Specification</strong> (specifically, the ECMA-262 Standard, 5 th Edition) and this appendix lists only productions<br />

that are new or modified from the ECMAScript grammar.<br />

A.1 Types<br />

TypeParameters:<br />

< TypeParameterList ><br />

TypeParameterList:<br />

TypeParameter<br />

TypeParameterList , TypeParameter<br />

TypeParameter:<br />

Identifier Constraint opt<br />

Constraint:<br />

extends Type<br />

TypeArguments:<br />

< TypeArgumentList ><br />

TypeArgumentList:<br />

TypeArgument<br />

TypeArgumentList , TypeArgument<br />

TypeArgument:<br />

Type<br />

Type:<br />

PrimaryOrUnionType<br />

FunctionType<br />

ConstructorType<br />

PrimaryOrUnionType:<br />

PrimaryType<br />

UnionType<br />

155

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!