Jump to content

Typescript errors since typescript plugin update


Recommended Posts

Hi everyone,


I have a big problem, I've just updated my Eclipse typescript plugin (palantir) and BJS do not compile anymore, there are erros that were not here 1 hour ago...

I'm targeting EcmaScript5 as usual, but even if I target EM6 those erros are still there...


Here are the errors :

(attaching img file)


palantir's plugin fault or new typescript specification not taken in account in BJS, or something else ?


Link to comment
Share on other sites

Yes, I can confirm the same.  I have been working in my own namespaces, not BABYLON, so I did not really care.  I use Gulp for actually building BABYLON, if the babylon.d.ts, or the combined JS file did not get committed to the repository that matches the individual files.


I have been ignoring these.  Could probably be fixed in mixins.ts though.  Building a single file JS using Planatir does not work in any case.  There are no ///references in the files, so stuff gets put in the wrong order.

Link to comment
Share on other sites

Oooh, poor me, I cannot revert back to previous palantir's version (anyway, I don't know how, if possible) :(


I'm not using palantir to compile the whole babylon.js file, I'm using it to check for errors when I modify a single .ts file and to compile just that one file to .js (gulp overwrite all .js files, that's pretty annoying to be able to commit just the little modification made on one single file...), or maybe I'm not understnading how to use gulp the right way...

Link to comment
Share on other sites

Some of those errors may actually need to be looked at, think the ones in mesh and the .set on number.  That database thing could just switch to any's.


Not all the files need to compile to edit and compile one though.  There are a bunch of checkboxes in compile properties concerning limiting the scope.  Not on the right machine, something like 'Build only when No errors', & 'Build all' checkboxes.


If just compiling your own stuff, you could just put in a separate project and copy babylon.d.ts file to it.  Not sure why you would be editing repository files, anyway, unless doing a fork.

Link to comment
Share on other sites

Oh in fact that didn't solved anything, after a fresh Eclipse reboot I can say that checking the "Raise error on expressions and declarations with an implied 'any' type" does not ignore those 9 erros at all, in fact with this option I have 276 errors jumping out... (and that seems more logical to me, according to the option name...).

So I don't know how to ignore those 9 errors... (I mean "by the compiler", I can easily ignore them myself by strongly closing my eyes)


Someone building typescript BJS in Eclipse with a solution for me ?


I tried to compile with gulp but I have many errors about gulp-tsc version = null... but when I try to update or reinstall I have errors with npm... :wacko:

Link to comment
Share on other sites

  • 2 weeks later...

Fixed !!


Thanks to RaananW in this post : http://www.html5gamedevs.com/topic/12229-starting-bjs-ts-sublime-text/


Ok, inspected it further.

I just pushed a PR to github with a fix that I hope will solve this entire thing.


It is an update to the gulpfile and npm's package file, including new dependencies. BabylonJS supports typescript 1.0.? at the moment, and this fix forces the typescript compiler to be this version.

Map files are generated, declaration files are generated as well (if wanted).

Wait for DK to merge it or simply update your gulpfile and package files.


Next thing would be to solve the compatibility issues with typescript 1.4

PR for ts 1.3 is here - https://github.com/BabylonJS/Babylon.js/pull/404

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.

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.


  • Recently Browsing   0 members

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