Skip to content

How I can configure it to target ES5 when checking for errors? #41

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

Closed
hippich opened this issue Jan 5, 2015 · 5 comments
Closed

How I can configure it to target ES5 when checking for errors? #41

hippich opened this issue Jan 5, 2015 · 5 comments

Comments

@hippich
Copy link

hippich commented Jan 5, 2015

I am getting a lot of:

"TS1056: Accessors are only available when targeting ECMAScript 5 and higher."

And was wondering if there is a way to configure it to use ES5 standard?

@clausreinke
Copy link
Owner

If I recall correctly, I used ES5 as the default target, with no configuration, but it has been a while.

I'm going to spend some time on this project next week anyway, because of #39. Given that TS1.4 has some ES6 capabilities, being able to configure the target sounds like a good idea.

@clausreinke
Copy link
Owner

@hippich can you provide a small test case that shows the error?

@hippich
Copy link
Author

hippich commented Jan 30, 2015

I got this error with simple test.ts file with the following content:

var Something = {
  get name() {
    return 'test';
  }
};

@clausreinke
Copy link
Owner

Thanks, that helps: I still see no error, with:

$ ../bin/tss --version
v0.3.1-2-g12c88d4

$ ../bin/tss empty.ts <issue-41.script
"loaded c:/javascript/typescript/codeplex/typescript-tools/tests/empty.ts, TSS listening.."
update 5 empty.ts
var Something = {
  get name() {
    return 'test';
  }
};
"updated c:/javascript/typescript/codeplex/typescript-tools/tests/empty.ts, (0/0) errors"
showErrors
[]

same if I load directly from file (instead of updating an empty file)

@hippich
Copy link
Author

hippich commented Jan 30, 2015

Uh, I am so sorry to waste your time on this - it turned out default configuration of Syntastic plugin was throwing it off. Yes, tss seems alright! Thank you!

@hippich hippich closed this as completed Jan 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants