Immer: Typescript error in v1.5

Created on 25 Jul 2018  Â·  5Comments  Â·  Source: immerjs/immer

Just upgraded to version 1.5 in an Angular project. Compilation shows the following errors:

ERROR in node_modules/immer/dist/immer.d.ts(4,3): error TS1131: Property or signature expected.
node_modules/immer/dist/immer.d.ts(4,25): error TS1005: ']' expected.
node_modules/immer/dist/immer.d.ts(4,26): error TS1005: ';' expected.
node_modules/immer/dist/immer.d.ts(4,27): error TS1128: Declaration or statement expected.
node_modules/immer/dist/immer.d.ts(4,40): error TS1005: '(' expected.
node_modules/immer/dist/immer.d.ts(5,1): error TS1128: Declaration or statement expected.
node_modules/immer/dist/immer.d.ts(8,5): error TS1005: ';' expected.
node_modules/immer/dist/immer.d.ts(8,43): error TS1005: '(' expected.
node_modules/immer/dist/immer.d.ts(9,5): error TS1005: ',' expected.
node_modules/immer/dist/immer.d.ts(9,32): error TS1005: '(' expected.
node_modules/immer/dist/immer.d.ts(9,56): error TS1005: '(' expected.
node_modules/immer/dist/immer.d.ts(10,5): error TS1005: ',' expected.
node_modules/immer/dist/immer.d.ts(10,37): error TS1005: '(' expected.
node_modules/immer/dist/immer.d.ts(11,4): error TS1005: ')' expected.

Version 1.3.1 works fine.

Cheers,

Jan

Most helpful comment

Meanwhile Angular 6.1 with TS 2.9 was released. All working fine. You just need a little bit of luck :-) ... The issue can be closed. (Sorry, I don't know if and how I can close an issue here.)

Thanks!

All 5 comments

You need at least TS 2.8

Op wo 25 jul. 2018 18:00 schreef Knacktus notifications@github.com:

Just upgraded to version 1.5 in an Angular project. Compilation shows the
following errors:

ERROR in node_modules/immer/dist/immer.d.ts(4,3): error TS1131: Property
or signature expected.
node_modules/immer/dist/immer.d.ts(4,25): error TS1005: ']' expected.
node_modules/immer/dist/immer.d.ts(4,26): error TS1005: ';' expected.
node_modules/immer/dist/immer.d.ts(4,27): error TS1128: Declaration or
statement expected.
node_modules/immer/dist/immer.d.ts(4,40): error TS1005: '(' expected.
node_modules/immer/dist/immer.d.ts(5,1): error TS1128: Declaration or
statement expected.
node_modules/immer/dist/immer.d.ts(8,5): error TS1005: ';' expected.
node_modules/immer/dist/immer.d.ts(8,43): error TS1005: '(' expected.
node_modules/immer/dist/immer.d.ts(9,5): error TS1005: ',' expected.
node_modules/immer/dist/immer.d.ts(9,32): error TS1005: '(' expected.
node_modules/immer/dist/immer.d.ts(9,56): error TS1005: '(' expected.
node_modules/immer/dist/immer.d.ts(10,5): error TS1005: ',' expected.
node_modules/immer/dist/immer.d.ts(10,37): error TS1005: '(' expected.
node_modules/immer/dist/immer.d.ts(11,4): error TS1005: ')' expected.

Version 1.3.1 works fine.

Cheers,

Jan

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/mweststrate/immer/issues/171, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABvGhEAN19WxyZbvR7lm29cBCi238K8Aks5uKJYUgaJpZM4VgW9k
.

Meanwhile Angular 6.1 with TS 2.9 was released. All working fine. You just need a little bit of luck :-) ... The issue can be closed. (Sorry, I don't know if and how I can close an issue here.)

Thanks!

@mweststrate Thank you for great library... I also faced above issue... But my project is quite big includes couple of teams will not be able to upgrade typescript easily... So i went on using UMD

Do you have any other better suggestion in this case ? or is it fine ?

@abidev you could grab the typings from the 1.4 version of the packages, and use patch-package to replace the latest typings with these older ones.

@mweststrate Thank you... will try that...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ymeine picture ymeine  Â·  6Comments

martinkadlec0 picture martinkadlec0  Â·  3Comments

DanielRuf picture DanielRuf  Â·  5Comments

mweststrate picture mweststrate  Â·  4Comments

steida picture steida  Â·  4Comments