Jump to content

TypeScript 3.0.1 Compiler Issue


Christopher Stock
 Share

Recommended Posts

Please pardon me announcing this issue with the latest Major of TypeScript:

Error:(6474, 5) TS2717: Subsequent property declarations must have the same type.  Property 'leftBounds' must be of type 'number[] | Float32Array', but here has type 'number[]'.
Error:(6475, 5) TS2717: Subsequent property declarations must have the same type.  Property 'rightBounds' must be of type 'number[] | Float32Array', but here has type 'number[]'.

This issue can be fixed by extendig the Type Definition for the class VRLayer in the following way:

interface VRLayer {
    leftBounds?: number[] | Float32Array | null;
    rightBounds?: number[] | Float32Array | null;
    source?: HTMLCanvasElement | null;
}

Keep up your great work and don't fight the feeling! :D ❤️ ❤️

Sincerely yours
Christopher 

Link to comment
Share on other sites

Hi @Deltakosh

I've forked your project on GitHub and noticed, that the project is running with TypeScript version 2.8.1 so the mentioned compiler errors do not appear yet. :)

Anyway -- I created a PR where the TypeScript version has been updated to the latest version 3.0.1 and fixed the mentioned compiler errors.
https://github.com/BabylonJS/Babylon.js/pull/4885

Your company did a great job and this was the only breaking change in your project that came with the new major.

Keep up the good work and have a nice weekend, dear David! :D

Sincerely
Christopher

Link to comment
Share on other sites

Oh .. my bad -- ?

I'd love to fix the tests but the Karma Test Runner couldn't find any Tests in

https://github.com/BabylonJS/Babylon.js/tree/master/
or
https://github.com/BabylonJS/Babylon.js/tree/master/tests/unit

on running

npm test

Can you give me an advice please? :D

Thanks & Greetings
Christopher

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...