unintellisense Posted April 19, 2017 Share Posted April 19, 2017 This is a very minor issue, but it also has a very minor fix I think. When building a TS project which includes the latest preview babylon.js typings, with the strictNullCheck:true flag set, the following error happens during compilation: lib/babylon.d.ts(674,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'crossOrigin' must be of type 'string | null', but here has type 'string'. The Typescript provided lib.d.ts defines crossOrigin as 'string | null' as the error suggests. Admittedly I am not sure of the build process used for BJS, But I think that this line https://github.com/BabylonJS/Babylon.js/blob/92ab030b50fc277904a823be642755d3f0fef006/src/babylon.mixins.ts#L155 just needs to be changed to match the lib.d.ts shape ( string | null ). I've never contributed to this project, but can create a PR if you want. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 19, 2017 Share Posted April 19, 2017 Please do :_) Quote Link to comment Share on other sites More sharing options...
unintellisense Posted April 20, 2017 Author Share Posted April 20, 2017 Done, thanks. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 20, 2017 Share Posted April 20, 2017 And merged! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.