Kesshi Posted February 23, 2017 Share Posted February 23, 2017 I updated to typescript 2.2.1 (from 2.1.6). I get the following error now if i build my project: node_modules/typescript/lib/lib.dom.d.ts(1380,11): error TS2320: Interface 'AudioContext' cannot simultaneously extend types 'AudioContextBase' and 'EventTarget'. Named property 'addEventListener' of types 'AudioContextBase' and 'EventTarget' are not identical. The compiler options to reproduce this: "target": "es5" "lib": ["es2015", "dom"] The problem seems to be this line: https://github.com/BabylonJS/Babylon.js/blob/master/src/babylon.mixins.ts#L44 Maybe this mixin can be removed now? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 24, 2017 Share Posted February 24, 2017 Yep I will remove it Quote Link to comment Share on other sites More sharing options...
DeathLucky Posted March 13, 2017 Share Posted March 13, 2017 Hello, Apparently, the line you mentioned is back : https://github.com/BabylonJS/Babylon.js/blob/master/src/babylon.mixins.ts And so is the problem it causes. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 13, 2017 Share Posted March 13, 2017 Which line are you mentioning? Quote Link to comment Share on other sites More sharing options...
DeathLucky Posted March 14, 2017 Share Posted March 14, 2017 This one : renderbufferStorageMultisample(target: number, samples: number, internalformat: number, width: number, height: number): void; I had the same error as Kesshi yesterday: node_modules/typescript/lib/lib.d.ts(5603,11): error TS2320: Interface 'AudioContext' cannot simultaneously extend types 'AudioContextBase' and 'EventTarget'. Named property 'addEventListener' of types 'AudioContextBase' and 'EventTarget' are not identical. Quote Link to comment Share on other sites More sharing options...
Kesshi Posted March 14, 2017 Author Share Posted March 14, 2017 Are you using the current release version of BabylonJs (2.5) ? This issue is only fixed in the preview release (3.0). Quote Link to comment Share on other sites More sharing options...
DeathLucky Posted March 14, 2017 Share Posted March 14, 2017 Yeah I'm using 2.5. So we need to wait for the new release to come then ? Quote Link to comment Share on other sites More sharing options...
Kesshi Posted March 14, 2017 Author Share Posted March 14, 2017 1 hour ago, DeathLucky said: Yeah I'm using 2.5. So we need to wait for the new release to come then ? No, you can just remove the AudioContext interface definition from the babylon.2.5.d.ts file here:https://github.com/BabylonJS/Babylon.js/blob/master/dist/babylon.2.5.d.ts#L501 davrous and 8Observer8 2 Quote Link to comment Share on other sites More sharing options...
DeathLucky Posted March 14, 2017 Share Posted March 14, 2017 Thank you ! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 14, 2017 Share Posted March 14, 2017 Or use v3.0-alpha if you are brave enough Quote Link to comment Share on other sites More sharing options...
8Observer8 Posted June 2, 2017 Share Posted June 2, 2017 I removed these lines from babylon.2.5.d.ts: interface AudioContext extends EventTarget { decodeAudioData(audioData: ArrayBuffer, successCallback: DecodeSuccessCallback, errorCallback?: any): void; } But now I see this error: Quote TypeScript error: src/babylon.2.5.d.ts(412,131): Error TS7006: Parameter 'ArrayBuffer' implicitly has an 'any' type. Quote Link to comment Share on other sites More sharing options...
8Observer8 Posted June 2, 2017 Share Posted June 2, 2017 I will use v3.0 because it works. 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.