Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Possible typo for MimeTypeArray interface #31358

Copy link
Copy link
@jeffryang24

Description

@jeffryang24
Issue body actions

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.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.