eldernos Posted June 25, 2013 Share Posted June 25, 2013 I wanted to get a first project running in Phaser and it was an extremely difficult process. I managed to find clues about configuring the csproj file to support the correct output and ecmascript level and that got me most of the way but, when it tried to compile the Phaser Typescript code, it found two error groups. 1) It said optional parameters were not allowed with default values. SO, everywhere in the project that there was "varname?: type = value" there was an error. I had to remove the question mark from each of those locations. 2) The QuadTree inheritance from Rectangle was rejected because _halfwidth and _halfheight were marked as private. Is this typical or a known issue? I couldn't find anything in the forums or documentation (such as it is). What versions of TypeScript have been tested? Are there compatibility flags that need to be set? Thank you. Link to comment Share on other sites More sharing options...
rich Posted June 25, 2013 Share Posted June 25, 2013 This is probably an issue with TypeScript 0.9 more than anything else. I still compile and build against 0.8.3.0 because they've broken a lot in 0.9 and it's still full of bugs, but even worse the compile times seem to have gone through the floor and with such a massive project I didn't want to have to put up with that right now. However I know I need to move to 0.9 because that is what people will be downloading when they hit the TS site now. I just don't need that pain right this second, so close to nearly being finished. But I guess I have to go through it before I can actually release 1.0, damn it Link to comment Share on other sites More sharing options...
Ezelia Posted June 25, 2013 Share Posted June 25, 2013 I spent the last two days moving a huge project from TS 0.8 to TS 0.9 I almost finished... but it's really annoying :/ there is many breaking changes and many weired behaviours. I think that it also broke some VS features, for exemple when errors ar reported on VS and you double click to jump to that error, you jump to the first line of the file containing error, not to the error itself ...in my case, most of broken compilation was because of duplicate declared variables (declare var something:type). also if you are using classic javascript codes as TS code there are some cases that don't compile wihout modifications. Link to comment Share on other sites More sharing options...
rich Posted June 25, 2013 Share Posted June 25, 2013 Yeah the feedback I've been reading on the TS forums all highlight similar issues. It's not just ready to be live yet, but they made it live anyway Link to comment Share on other sites More sharing options...
Mike Posted June 25, 2013 Share Posted June 25, 2013 Well I updated TS just yesterday, and yep i join the moaning... But still there is a lot cool features so generaly I'm eagerly waiting for TS 1.0 and Phaser 1.0 andthen sky is the limit. Link to comment Share on other sites More sharing options...
eldernos Posted June 26, 2013 Author Share Posted June 26, 2013 My overall process of getting the code to compile took about 30 minutes (removing a bunch of question marks) and changing the private variables in rectangle to public. It works, or seems to. I haven't dug too deep into the full library so I may be missing something but my understanding of the code changes I made seem like they'd be work-around-able if not nominal. Link to comment Share on other sites More sharing options...
rich Posted June 26, 2013 Share Posted June 26, 2013 Yes it's a process I will go through before release, but not just yet. Link to comment Share on other sites More sharing options...
turnA Posted July 14, 2013 Share Posted July 14, 2013 Looks like I encounter the same problem here. Is there any way for me to rollback to Typescript 0.8.3 using the NodeJS version? I want to use Phaser 0.97 now, but I'm still just learning and don't know how to customize it to work properly for Typescript 0.9 yet.Do I need to fallback using pure javascript for now? I also want to know more the syntax and usage of Phaser 0.97 since all the example is for 0.95. Link to comment Share on other sites More sharing options...
Travis Posted August 2, 2013 Share Posted August 2, 2013 Noooo I hit this brick wall too... I'm just gonna wait for the update. So sad. Wanted to give Phaser a go. Link to comment Share on other sites More sharing options...
rich Posted August 2, 2013 Share Posted August 2, 2013 You don't have to use TypeScript, the JS version works just fine But yes making it work with 0.9 is crucial (and annoying!) Link to comment Share on other sites More sharing options...
Recommended Posts