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

Standard library features for v1.0 #7

Open
8 of 53 tasks
emlai opened this issue Jan 1, 2019 · 0 comments
Open
8 of 53 tasks

Standard library features for v1.0 #7

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

Comments

@emlai
Copy link
Owner

emlai commented Jan 1, 2019

This issue lists standard library features to be implemented for the v1.0 release.

Note that ts-llvm will not attempt to implement all of the JavaScript standard library, only those features 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 standard library features:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects

Standard library APIs implemented currently in ts-llvm can be seen in: https://github.com/ts-llvm/ts-llvm/blob/master/lib/lib.ts-llvm.d.ts. Their implementations are in https://github.com/ts-llvm/ts-llvm/tree/master/lib/runtime.


Array:

  • constructor from array literal
  • length (get only)
  • push (single parameter only)
  • element access via subscript
  • includes
  • join
  • indexOf
  • lastIndexOf
  • slice
  • toString
  • every
  • filter
  • find
  • findIndex
  • map
  • reduce
  • some

String:

  • constructor from string literal
  • length
  • concat (single parameter only)
  • includes
  • endsWith
  • startsWith
  • indexOf
  • lastIndexOf
  • replace (no regex)
  • split
  • slice
  • substring
  • toLowerCase
  • toUpperCase
  • trim
  • toString

Map:

  • constructor
  • size
  • clear
  • delete
  • get
  • has
  • set
  • keys
  • values

Set:

  • constructor
  • size
  • add
  • clear
  • delete
  • has
  • keys
  • values

console:

  • log

Global functions:

  • parseFloat
  • parseInt
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