Skip to content

onerror events should match addEventListener('error') event types #8202

@evmar

Description

@evmar

(From TypeScript 1.8.2 lib.d.ts as included with VSCode.)

E.g. I think these should be using ErrorEvent, not Event. (Perhaps it's intentional?)

interface MSBaseReader {
    onerror: (ev: Event) => any;
    addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
interface IDBDatabase extends EventTarget {
    onerror: (ev: Event) => any;
    addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;

There are others.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issue

    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