-
Hi, i'm making a multiplayer turn based rpg game with front end in Angular with latest Excalibur. I try to go with quite new Angular but since version 11+ i encounter TypeScript TS2380 exception during build/serve: Error: node_modules/excalibur/build/dist/Label.d.ts:106:9 - error TS2380: 'get' and 'set' accessor must have the same type. 106 get spriteFont(): LegacySpriteFont; Error: node_modules/excalibur/build/dist/Label.d.ts:107:9 - error TS2380: 'get' and 'set' accessor must have the same type. 107 set spriteFont(sf: LegacySpriteFont | SpriteFont); it is thrown because of Excalibur, as you can see above. Did enyone encounter this type of issue and if so then which version of TS is compatible or which check check is responsible for skipping this so i can succesfully run my project? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @KrzyZyb! The multiple write type properties feature is supported in TypeScript 4.3+ https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-3.html#separate-write-types-on-properties Angular 12+ appears to support newer versions of TypeScript that also support this feature https://update.angular.io/?v=12.0-14.0 I like the idea of posting the supported TypeScript versions for Excalibur, I'll update the documentation. We could also perhaps use the npm |
Beta Was this translation helpful? Give feedback.
Hi @KrzyZyb!
The multiple write type properties feature is supported in TypeScript 4.3+ https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-3.html#separate-write-types-on-properties
Angular 12+ appears to support newer versions of TypeScript that also support this feature https://update.angular.io/?v=12.0-14.0
I like the idea of posting the supported TypeScript versions for Excalibur, I'll update the documentation. We could also perhaps use the npm
package.json
peer dependency to advertise the supported TypeScript versions. See #2283