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

BooleanCompilerOptions uses TypeScript@2.9 features #74

Closed
JoshuaKGoldberg opened this issue Jul 25, 2018 · 2 comments
Closed

BooleanCompilerOptions uses TypeScript@2.9 features #74

JoshuaKGoldberg opened this issue Jul 25, 2018 · 2 comments

Comments

@JoshuaKGoldberg
Copy link
Contributor

See discussion in microsoft/tslint-microsoft-contrib#469 (comment):

Using tsc v2.6.2
node_modules/tsutils/util/util.d.ts(117,73): error TS1005: ';' expected.
node_modules/tsutils/util/util.d.ts(118,1): error TS1128: Declaration or statement expected.
node_modules/tsutils/util/util.d.ts(118,3): error TS1128: Declaration or statement expected.
node_modules/tsutils/util/util.d.ts(119,17): error TS1005: ',' expected.
node_modules/tsutils/util/util.d.ts(119,36): error TS1005: ';' expected.
node_modules/tsutils/util/util.d.ts(119,44): error TS1005: ';' expected.
node_modules/tsutils/util/util.d.ts(120,3): error TS1128: Declaration or statement expected.

tsutils lists its TypeScript dependency as allowing 2.1 and up. Two issues:

  • Either this construct should be simplified or that dependency should be upgraded
  • Can there be builds added that test with TypeScript at the lowest allowed version?
@ajafff
Copy link
Owner

ajafff commented Jul 25, 2018

tsutils lists its TypeScript dependency as allowing 2.1 and up

Note that the version of TypeScript used to compile your project is not necessarily the version installed in node_modules (at design or run time).

From README.md:

This package is backwards compatible with typescript 2.1.0 at runtime although compiling might need a newer version of typescript installed.

Shipping declaration files for different versions of the compiler is not possible. Especially when adding utilities for newer TypeScript versions.

Compiling with TypeScript@2.8 succeeds. And that's currently the lowest version I'm actively trying to make this library compatible with at compile time.


I agree it's a bit surprising this is now a syntax error which cannot be suppressed with skipLibCheck.

Can there be builds added that test with TypeScript at the lowest allowed version?

Sure. Feel free to submit a pull request that ensures the emitted declaration files are compatible with a certain version of TypeScript.

@ajafff
Copy link
Owner

ajafff commented Jul 29, 2018

FWIW, I updated the dependency of TypeScript to >=2.8.0 in v3.0.0 of this library

@ajafff ajafff closed this as completed Jul 29, 2018
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

2 participants