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

Typescript compile errors #10

Closed
AlexKR opened this issue Nov 8, 2016 · 2 comments
Closed

Typescript compile errors #10

AlexKR opened this issue Nov 8, 2016 · 2 comments

Comments

@AlexKR
Copy link

AlexKR commented Nov 8, 2016

Typescript version: 1.8.10 (should be the same for typescript < 2)
Web-request version with compile errors: 1.0.7
Last working web-request version: 1.0.6

Errors:

./node_modules/web-request/index.d.ts
Error:(150, 25) TS1110:Type expected.
Error:(150, 25) TS7008:Member 'null' implicitly has an 'any' type.
Error:(177, 5) TS2300:Duplicate identifier 'readonly'.
Error:(177, 14) TS1005:'=' expected.

random.ts
Error:(43, 38) TS2339:Property 'content' does not exist on type 'Response<string>'.

1.0.6 and 1.0.7 have different index.d.ts file

Additional info: error on typescript 1.8.10 from node_modules, system version of typescript - 2.0.3

@davetemplin
Copy link
Owner

A change was taken to 1.0.7 to take advantage of non-nullable types which is a new feature of TypeScript 2.0. Unfortunately this appears to be a breaking change if you are using a lower version as you've suggested. In hindsight the library version should have been bumped up to 2.x. My apologies for any disruption this has caused.

Some options might be to move your toolset up to TypeScript 2.0 or lock your library dependency to 1.0.6. Do either of these options work for you?

@AlexKR
Copy link
Author

AlexKR commented Nov 13, 2016

@davetemplin Thanks, 1.0.6 works fine

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