Babylon.js: TypeScript compile fails with Typescript 3.1

  • Bug repro on playground: N/A
  • Expected result: Typescript project using BabylonJS compiles with TS 3.1
  • Current result: Typescript project using BabylonJS does NOT compile with TS 3.1

TypeScript 3.1 released recently and, during some changes to a project of mine, I updated my dep from 3.0.1 to 3.1.1. Almost immediately, however, builds began to fail.

This message keeps getting written to console:

Using tsc v3.1.1
node_modules/babylonjs/babylon.d.ts(250,5): error TS2687: All declarations of 'fullscreen' must have identical modifiers.
node_modules/babylonjs/babylon.d.ts(293,5): error TS2687: All declarations of 'orientation' must have identical modifiers.
node_modules/babylonjs/babylon.d.ts(293,5): error TS2717: Subsequent property declarations must have the same type.  Property 'orientation' must be of type 'ScreenOrienta
tion', but here has type 'string'.
node_modules/typescript/lib/lib.dom.d.ts(4030,14): error TS2687: All declarations of 'fullscreen' must have identical modifiers.
node_modules/typescript/lib/lib.dom.d.ts(13881,14): error TS2687: All declarations of 'orientation' must have identical modifiers.

I’ve tried this with both 3.3.0-beta.2 and 3.3.0-rc.4 of BabylonJS. This issue does not happen when I roll back to TSC v3.0.

I suspect it has something to do with these breaking changes, just judging by the output, but I don’t know for certain.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 9
  • Comments: 23 (10 by maintainers)

Most upvoted comments

Should be good now Please let me know if you can test it