Temechon Posted December 22, 2014 Share Posted December 22, 2014 Hello all, I was working on the Gamepad API, and found several issues with Chrome. I fixed it in js, but I thought "Hey, I will try to make a pull request in Typescript, it will surely help the dev team !" However, I cannot compile the project (with PHPStorm/VS2013). Here are my errors : D:/BABYLONJS/trunk/Babylon/Materials/textures/babylon.videoTexture.ts(36,24): error TS2339: Property 'src' does not exist on type 'HTMLElement'.D:/BABYLONJS/trunk/Babylon/Mesh/babylon.mesh.ts(840,53): error TS2345: Argument of type 'number[]' is not assignable to parameter of type 'Uint8Array'.D:/BABYLONJS/trunk/Babylon/Mesh/babylon.mesh.ts(1113,122): error TS2345: Argument of type 'number[]' is not assignable to parameter of type 'Uint8Array'.D:/BABYLONJS/trunk/Babylon/Tools/babylon.database.ts(260,58): error TS2339: Property 'error' does not exist on type 'Element'.D:/BABYLONJS/trunk/Babylon/Tools/babylon.database.ts(379,50): error TS2339: Property 'error' does not exist on type 'Element'.D:/BABYLONJS/trunk/Babylon/Tools/babylon.database.ts(510,58): error TS2339: Property 'error' does not exist on type 'Element'.D:/BABYLONJS/trunk/Babylon/Tools/babylon.tools.ts(294,35): error TS2339: Property 'result' does not exist on type 'EventTarget'.D:/BABYLONJS/trunk/Babylon/Tools/babylon.tools.ts(303,35): error TS2339: Property 'result' does not exist on type 'EventTarget'.D:/BABYLONJS/trunk/Babylon/Tools/babylon.tools.ts(537,32): error TS2339: Property 'set' does not exist on type 'number[]'. Where do these errors comes from ? I tried to google it but no results...Moreover, I can see these two files have been committed : babylon.debugLayer.d.ts and babylon.debugLayer.js.mapIs it a mistake ? Thank you for your help ! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 22, 2014 Share Posted December 22, 2014 You (ESPECIALLY YOU:)) should use Visual Studio ! Quote Link to comment Share on other sites More sharing options...
Temechon Posted December 22, 2014 Author Share Posted December 22, 2014 It's the same problem with VS 2013 :/ Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted December 24, 2014 Share Posted December 24, 2014 Hey Temechon You can try to add the "Babylon/babylon.mixins.ts" file in your project to fix these compilation issues. About these two files, I think it's a mistake when pushing on github. These files are generated by grunt when you compile the TypeScript Quote Link to comment Share on other sites More sharing options...
Temechon Posted December 25, 2014 Author Share Posted December 25, 2014 Hey Luaacro, Thank you for your help babylon.mixin is already in my project, and I still have these errors... Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted December 26, 2014 Share Posted December 26, 2014 Hum... ^^And are you working with the TypeScript version 1.0 ? Quote Link to comment Share on other sites More sharing options...
Temechon Posted December 26, 2014 Author Share Posted December 26, 2014 I'm working with the version 1.3. I tried with version 1.1 too, with no success. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 27, 2014 Share Posted December 27, 2014 Do you enabled "Allow 'any' implicit type" ? Can you share your visual studio project? Quote Link to comment Share on other sites More sharing options...
Temechon Posted December 28, 2014 Author Share Posted December 28, 2014 Hey DK, "Allow any" is enabled, I think it is enabled by default.I can share my VS project ofc, but I want to try with vs 2015 before (I don't want you to lose your time on this).If it doesn't work with vs2015, I will share it, no problem Thanks ! Quote Link to comment Share on other sites More sharing options...
Temechon Posted December 28, 2014 Author Share Posted December 28, 2014 Doesn't work with VS 2015 either :/ I should do something wrong... My project is here: https://dl.dropboxusercontent.com/u/17799537/TypeScriptHTMLApp1.zip Thank you for your time ! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 28, 2014 Share Posted December 28, 2014 Oh this is because you have both .ts and .js in your project. You have to remove all .js from the project to make it work Quote Link to comment Share on other sites More sharing options...
Temechon Posted December 28, 2014 Author Share Posted December 28, 2014 Same error by removing all js in all subfolders Quote Link to comment Share on other sites More sharing options...
Meulta Posted December 29, 2014 Share Posted December 29, 2014 Hello, Did you remove them from Visual Studio or on the windows folder only ? Meulta Quote Link to comment Share on other sites More sharing options...
Temechon Posted December 29, 2014 Author Share Posted December 29, 2014 Hi Meulta, Actually I created a new project with only the typescript files. Quote Link to comment Share on other sites More sharing options...
RaananW Posted December 29, 2014 Share Posted December 29, 2014 Hiya, Your project works perfectly in my visual studio 2013 (after removing all js files).The only thing I did was removing the TypeScriptToolsVersion from the project file, as the typescript compiler is integrated already in visual studio 2013.When do you get the errors? Quote Link to comment Share on other sites More sharing options...
Temechon Posted December 29, 2014 Author Share Posted December 29, 2014 I'm working with VS2015 now. I tried to remove the TypeScriptToolsVersion but same errors.I get these errors when I try to build/rebuild the solution (during the typescript compilation actually). Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted December 30, 2014 Share Posted December 30, 2014 I got a problem with TypeScript and found a solution with davrous : I'm using Visual Sutdio 2013 with TypeScript version 1.0.Can you try with the 1.0 version instead of 1.1 ? Quote Link to comment Share on other sites More sharing options...
Temechon Posted December 30, 2014 Author Share Posted December 30, 2014 I tried with PHPStorm and Typescript v1.0.1.0 (I didn't found the 1.0) and same errors.I'm reinstalling vs 2013 right now, just let me few hours Quote Link to comment Share on other sites More sharing options...
Temechon Posted December 30, 2014 Author Share Posted December 30, 2014 Ok, it seems to work with VS 2013 and typescript 1.0. Finally !!! \o/Thank you all for your help. I have two pull request to do now Let's work ! Quote Link to comment Share on other sites More sharing options...
Temechon Posted December 30, 2014 Author Share Posted December 30, 2014 And the PR for the gamepad api is now done. Thank you again for your help folks Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 31, 2014 Share Posted December 31, 2014 Yeah I appreciate new PR Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.