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.

4.9.1 Standard Function Expressions ........................................................................................................................... 63<br />

4.9.2 Arrow Function Expressions ................................................................................................................................. 63<br />

4.9.3 Contextually Typed Function Expressions ...................................................................................................... 65<br />

4.10 Property Access ............................................................................................................................................................. 65<br />

4.11 The new Operator ......................................................................................................................................................... 67<br />

4.12 Function Calls ................................................................................................................................................................. 67<br />

4.12.1 Overload Resolution ............................................................................................................................................... 68<br />

4.12.2 Type Argument Inference ..................................................................................................................................... 69<br />

4.12.3 Grammar Ambiguities ............................................................................................................................................ 71<br />

4.13 Type Assertions .............................................................................................................................................................. 72<br />

4.14 Unary Operators ............................................................................................................................................................ 73<br />

4.14.1 The ++ and -- operators ....................................................................................................................................... 73<br />

4.14.2 The +, –, and ~ operators ..................................................................................................................................... 73<br />

4.14.3 The ! operator ............................................................................................................................................................ 73<br />

4.14.4 The delete Operator ................................................................................................................................................ 74<br />

4.14.5 The void Operator ................................................................................................................................................... 74<br />

4.14.6 The typeof Operator ............................................................................................................................................... 74<br />

4.15 Binary Operators ........................................................................................................................................................... 74<br />

4.15.1 The *, /, %, –, , >>>, &, ^, and | operators ...................................................................................... 74<br />

4.15.2 The + operator .......................................................................................................................................................... 75<br />

4.15.3 The , =, ==, !=, ===, and !== operators ................................................................................... 75<br />

4.15.4 The instanceof operator ........................................................................................................................................ 76<br />

4.15.5 The in operator ......................................................................................................................................................... 76<br />

4.15.6 The && operator ...................................................................................................................................................... 76<br />

4.15.7 The || operator ........................................................................................................................................................... 76<br />

4.16 The Conditional Operator .......................................................................................................................................... 77<br />

4.17 Assignment Operators ................................................................................................................................................ 77<br />

4.17.1 Destructuring Assignment .................................................................................................................................... 78<br />

4.18 The Comma Operator ................................................................................................................................................. 80<br />

4.19 Contextually Typed Expressions .............................................................................................................................. 80<br />

4.20 Type Guards .................................................................................................................................................................... 81<br />

5 Statements .................................................................................................................................................................................. 87<br />

5.1 Variable Statements ..................................................................................................................................................... 87<br />

5.1.1 Simple Variable Declarations ............................................................................................................................... 87<br />

5.1.2 Destructuring Variable Declarations................................................................................................................. 88<br />

5.1.3 Implied Type .............................................................................................................................................................. 91<br />

5.2 If, Do, and While Statements .................................................................................................................................... 92<br />

5.3 For Statements ............................................................................................................................................................... 92<br />

5.4 For-In Statements ......................................................................................................................................................... 92<br />

5.5 Continue Statements ................................................................................................................................................... 93<br />

5.6 Break Statements .......................................................................................................................................................... 93<br />

iii

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

Saved successfully!

Ooh no, something went wrong!