Skip to content

MutationObserver API declarations missing #11305

Closed
@AvraamMavridis

Description

@AvraamMavridis

The MutationObserver related declarations are missing from the lib.d.ts file. Since this API is not browser specific I would expect the declarations to exist (as it happens with FileReader for example).

TypeScript Version: 2.0.3

Code

if( window && window.MutationObserver  )
{
   ...
}

Expected behavior:

To not arise an error.

Actual behavior:

Error : Property MutationObserver does not exist on type Window

I "solved" it by using the window["MutationObserver"] syntax. If that is an actual bug/issue I can provide a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    QuestionAn issue which isn't directly actionable in code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions