Jump to content

[Solved] Compile error in lib.dom.d.ts with Typescript 2.2.1


Kesshi
 Share

Recommended Posts

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?

 

 

Link to comment
Share on other sites

  • 3 weeks later...

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.

Link to comment
Share on other sites

  • 2 months later...

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.

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...