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

how to use lib.es6.d.ts?I try to use some method of es6?but it just go error! #1582

Closed
tommyZZM opened this Issue Dec 31, 2014 · 5 comments

Comments

Projects
None yet
3 participants
@tommyZZM
Copy link

commented Dec 31, 2014

error TS2339: Property 'trunc' does not exist on type 'Math'.

@DickvdBrink

This comment has been minimized.

Copy link
Contributor

commented Dec 31, 2014

I believe this happens automatically when calling tsc with --target es6

See this code here:

getDefaultLibFilename: options => combinePaths(getDirectoryPath(normalizePath(sys.getExecutingFilePath())), options.target === ScriptTarget.ES6 ? "lib.es6.d.ts" : "lib.d.ts"),

Are you using the master branch?

@tommyZZM

This comment has been minimized.

Copy link
Author

commented Dec 31, 2014

i m using the release 1.3.0 ...

@DickvdBrink

This comment has been minimized.

Copy link
Contributor

commented Dec 31, 2014

Ah, I believe it comes available in a newer version. You might get away with copying the lib.es6.d.ts and call tsc with --target es5 --noLib lib.es6.d.ts ...<files> but I'm not sure if everything is compatible

@DanielRosenwasser

This comment has been minimized.

Copy link
Member

commented Dec 31, 2014

You're not meant to use lib.es6.d.ts yet, it's for the 1.4 release.

But, if you really don't want to wait, you can do the following at your own risk. This is my own advice and not actually a supported scenario.

  1. Go to your TypeScript package's bin directory.
  2. Rename your lib.d.ts file to lib.d.ts.bak or something similar.
  3. Copy the current lib.es6.d.ts into your bin directory .
  4. Try it out.
  5. Report back and let us know if it worked.
@tommyZZM

This comment has been minimized.

Copy link
Author

commented Jan 2, 2015

i think i would wait 1.4 release~ thanks above~> <

@tommyZZM tommyZZM closed this Jan 2, 2015

@Microsoft Microsoft locked and limited conversation to collaborators Jun 18, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.