Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language features for v1.0 #6

Open
26 of 47 tasks
emlai opened this issue Jan 1, 2019 · 0 comments
Open
26 of 47 tasks

Language features for v1.0 #6

emlai opened this issue Jan 1, 2019 · 0 comments
Milestone

Comments

@emlai
Copy link
Owner

emlai commented Jan 1, 2019

This issue lists language features to be implemented for the v1.0 release. For the standard library roadmap, see #7.

Note that ts-llvm will not attempt to implement all JavaScript/TypeScript language features, only those that are used the most and are compatible with strict typing. Language features not in this list will be implemented later.

See e.g. this JavaScript reference for a full list of JS language features:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference

For a full list of TypeScript-specific language features, see the TypeScript handbook:
https://www.typescriptlang.org/docs/handbook/basic-types.html


Data types:

  • Booleans
  • Numbers
  • Strings
  • Array of numbers/booleans/strings
  • Array of objects
  • Objects
  • Null or undefined
  • Functions as parameters and return values

Statements:

  • Top-level statements
  • if...else
  • while
  • for
  • for...of
  • break
  • continue

Declarations:

  • Global functions
  • Local functions
  • Variable declarations
  • Classes
  • Class constructors
  • Class methods

Expressions:

  • Number literals
  • Boolean literals
  • String literals
  • Object literals
    • Shorthand property names
  • Array literals
  • this (for classes)

Operators:

  • =
  • Comparison operators ===, !==, <, >, <=, >=
    • for numbers
    • for booleans
    • for strings
    • for objects
  • Arithmetic operators for numbers +, -, *, /, %
  • + for strings
  • Bitwise operators &, |, ^, ~, <<, >>, >>>
  • Logical operators !, &&, ||
  • Assignment operators +=, -=, *=, /=, %=, &=, |=, ^=, <<=, >>=, >>>=
  • [] (for arrays)

TS features:

  • Generic classes
  • Generic functions
  • Enums
  • Interfaces
  • Union types with at least null or undefined. See About Add Union Types #5 for more discussion.
  • Function types

Miscellaneous:

@emlai emlai added this to the v1.0 milestone Jan 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant