Skip to content
This repository was archived by the owner on Mar 9, 2025. It is now read-only.

Language features for v1.0 #6

Description

@emillaine

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:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions