Plugin transpiler typescript and .map

Hi.

I'm wondering if it's normal to have a xxx.js.map after autotranpiling.

C:/wamp/www/MotorEngineIso/public_html/lib/pixi.d.ts(188,15): error TS2141: Class 'PIXI.Sprite' cannot extend class 'PIXI.DisplayObjectContainer':
 Class 'PIXI.Sprite' defines instance member property 'mouseover', but extended class 'PIXI.DisplayObjectContainer' defines it as instance member function.
C:/wamp/www/MotorEngineIso/public_html/lib/pixi.d.ts(227,54): warning TS7020: Use of deprecated type 'bool'. Use 'boolean' instead.
C:/wamp/www/MotorEngineIso/public_html/Engine/Textures/Textures.class.ts(42,26): warning TS7020: Use of deprecated type 'bool'. Use 'boolean' instead.

I have some error, but the code works on another computer.
And a .js.map file is created automatically with this kind of content:
{"version":3,"file":"Textures.class.js","sourceRoot":"","sources":["Textures.class.ts"],"names":["KENJI","KENJI.Textures","KENJI.Textures.constructor","KENJI.Textures.getLoaded","KENJI.Textures.loadJSONfile","KENJI.Textures.loadJSONfile.onreadystatechange","KENJI.Textures.onJSONLoaded","KENJI.Textures.setClips","","KENJI.Textures.clone"],"mappings":"AAAA,2CAA2C;AAE3C,ETC...

It's normal? Why do I have these errors? (I saw the error description but my friend who developped the file don't have these errors...

If you have some explanations, thank you!

2 comments

Hello!


>I have some error, but the code works on another computer.

You must have a different version of typescript installed on another computer. For example, the primitive type 'bool' is valid in typescript 0.8.*, but deprecated in 0.9.0 (see (https://typescript.codeplex.com/wikipage?title=Known%20breaking%20changes%20between%200.8%20and%200.9). Seems that your code is written for older version, but you are using the most recent compiler version (0.9.1) to build it

>And a .js.map file is created automatically with this kind of content:

it's by design - the TypeScript file watcher is preconfigured to use the --sourcemap option, so that the source maps are genereated automatically when running the transpiler. If you don't need to debug your typescript code (and thus don't need the maps being created), you can edit your file watcher settings accordingly (remove --sourcemap option from the program arguments)

0

Please sign in to leave a comment.