Skip to content

Possible typo for MimeTypeArray interface #31358

Closed
microsoft/TypeScript-DOM-lib-generator
#700
@jeffryang24

Description

@jeffryang24

TypeScript Version: 3.4.1

Search Terms: lib.dom.d.ts

Code

// A *self-contained* demonstration of the problem follows...
// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc.

Expected behavior:

Based on https://developer.mozilla.org/en-US/docs/Web/API/MimeTypeArray, some of MimeTypeArray properties should return MimeType interface instead of Plugin interface.

interface MimeTypeArray {
    readonly length: number;
    item(index: number): MimeType;
    namedItem(type: string): MimeType;
    [index: number]: MimeType;
}

Actual behavior:

Some of MimeTypeArray properties return Plugin interface.

interface MimeTypeArray {
    readonly length: number;
    item(index: number): Plugin;
    namedItem(type: string): Plugin;
    [index: number]: Plugin;
}

Playground Link:

Related Issues:

I'm surprised that the typo has been around for four years since ad449ce0fae354df03e97e7e8507b9e4f1880001.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions