turbulenz / turbulenz_engine

Turbulenz is a modular 3D and 2D game framework for making HTML5 powered games for browsers, desktops and mobile devices.

Home Page:http://turbulenz.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hundreds of Errors in TypeScript

sgtfrankieboy opened this issue · comments

I'm trying to use the Engine using TypeScript but whenever I reference a declaration file or another file which I need to use for Syntax highlighting I will get tons of errors.
Most of them being "Statements are not allowed in ambient contexts." Which is caused by a ';' behind the '}' of every Interface/Class.

The next problem is that 'VMath', 'debug', etc. Are all missing when I try to reference a file so I get proper syntax highlighting ("tslib/webgl/turbulenzengine.ts").

I'm using Visual Studio 2012 with TypeScript 0.9. And I'm not going to use the edited one from the team because of the reason that there are errors in TypeScript. Because if there where you can do a pull request on the actual code on Codeplex and fix the problem. Instead off forking it to Github and not pushing the fixes.

Overall there are to many errors in the TypeScript files to actually use them in development. And I'm not going to use JavaScript because the project is going to grow and I don't want to run into any typing errors in a later stage in development.

The current version of the engine requires version 0.8.3 of the TypeScript compiler. We are in the process of migrating to 0.9.

The VMath and debug problems are likely to because you are referencing the .ts files directly. It's better to reference the .d.ts files in jslib-modular. See the TypeScript sections of the documentation for details.

BTW, there is no requirement to use our custom version of the compiler to build YOUR code, unless you are using our build systems. The custom version changes some of the basic behavior with respect to error handling to make the compiler fit better with proper build systems. I don't think we've ever claimed that TypeScript itself is "broken". We've pointed the MS guys at our changes and made the appropriate feature requests.

I'll close this ticket for now. Please re-open if this doesn't solve your problem.