Update faq.md

This commit is contained in:
Abhijith Chatra 2017-02-28 18:04:52 -08:00 committed by GitHub
parent e08148cac6
commit cdc0d12a98

View File

@ -6,15 +6,14 @@ For the @boardname@, we support a "static" subset of TypeScript (itself a supers
## Supported language features ## Supported language features
* variables with `let`, `const`, and `var` * variables with `let` and `const`
* functions with lexical scoping and recursion * functions with lexical scoping and recursion
* top-level code in the file; hello world really is `console.log("Hello world")` * top-level code in the file; hello world really is `console.log("Hello world")`
* `if ... else if ... else` statements * `if ... else if ... else` statements
* `while` and `do ... while` loops * `while` and `do ... while` loops
* `for(;;)` loops (see below about `for ... in/of`) * `for(;;)` loops and for ... of
* `break/continue`; also with labeled loops * `break/continue`; also with labeled loops
* `switch` statement (on numbers only) * `switch` statement (on numbers only)
* `debugger` statement for breakpoints
* conditional operator `? :`; lazy boolean operators * conditional operator `? :`; lazy boolean operators
* namespaces (a form of modules) * namespaces (a form of modules)
* all arithmetic operators (including bitwise operators); note that in microcontroller targets * all arithmetic operators (including bitwise operators); note that in microcontroller targets
@ -25,6 +24,7 @@ For the @boardname@, we support a "static" subset of TypeScript (itself a supers
* classes with fields, methods and constructors; `new` keyword * classes with fields, methods and constructors; `new` keyword
* array literals `[1, 2, 3]` * array literals `[1, 2, 3]`
* enums * enums
* class inheritance
## Unsupported language features ## Unsupported language features
@ -32,10 +32,10 @@ We generally stay away from the more dynamic parts of JavaScript.
Things you may miss and we may implement: Things you may miss and we may implement:
* exceptions (`throw`, `try ... catch`, `try ... finally`) * exceptions (`throw`, `try ... catch`, `try ... finally`)
* `for ... of` statements * `for ... in` statements
* object literals `{ foo: 1, bar: "two" }` * object literals `{ foo: 1, bar: "two" }`
* method-like properties (get/set accessors) * method-like properties (get/set accessors)
* class inheritance * `debugger` statement for breakpoints
For JS-only targets we may implement the following: For JS-only targets we may implement the following:
@ -55,4 +55,4 @@ Things that we are not very likely to implement:
* `eval` * `eval`
* `delete` statement * `delete` statement
* `for ... in` statements * `for ... in` statements
* JSX (HTML as part of JavaScript) * JSX (HTML as part of JavaScript)