Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AriaRequestEvent and CommandEvent No Longer Included in Lib.Dom #15185

Closed
mjbvz opened this issue Apr 13, 2017 · 1 comment
Closed

AriaRequestEvent and CommandEvent No Longer Included in Lib.Dom #15185

mjbvz opened this issue Apr 13, 2017 · 1 comment
Labels
Breaking Change Would introduce errors in existing code VS Code Tracked There is a VS Code equivalent to this issue

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Apr 13, 2017

TypeScript Version: 2.3.1-insiders.20170413

Bug

It looks like AriaRequestEvent and CommandEvent are no longer defined in the TypeScript 2.3 lib.dom typings definitions. We use these types one or two places in the VSCode codebase. Is this expected?

@mjbvz mjbvz added the VS Code Tracked There is a VS Code equivalent to this issue label Apr 13, 2017
mjbvz added a commit to mjbvz/vscode that referenced this issue Apr 13, 2017
Tested recomppiling VSCode with TS2.3. This fixes a few issues that were discovered, including workarounds for:

* microsoft/TypeScript#15184
* microsoft/TypeScript#15185
@mhegazy mhegazy added the Breaking Change Would introduce errors in existing code label Apr 14, 2017
@mhegazy mhegazy added this to the TypeScript 2.3.1 milestone Apr 14, 2017
mjbvz added a commit to microsoft/vscode that referenced this issue Apr 14, 2017
Tested recomppiling VSCode with TS2.3. This fixes a few issues that were discovered, including workarounds for:

* microsoft/TypeScript#15184
* microsoft/TypeScript#15185
@mhegazy
Copy link
Contributor

mhegazy commented Apr 14, 2017

This is an intentional breaking change. AriaRequestEvent and CommandEvent were IE-specific definitions and not part of the spec. If you still need them you can include the definitions locally in your project:

interface AriaRequestEventInit extends EventInit {
    attributeName?: string;
    attributeValue?: string;
}
interface AriaRequestEvent extends Event {
    readonly attributeName: string;
    attributeValue: string | null;
}

declare var AriaRequestEvent: {
    prototype: AriaRequestEvent;
    new(type: string, eventInitDict?: AriaRequestEventInit): AriaRequestEvent;
}


interface CommandEventInit extends EventInit {
    commandName?: string;
    detail?: string;
}


interface CommandEvent extends Event {
    readonly commandName: string;
    readonly detail: string | null;
}

declare var CommandEvent: {
    prototype: CommandEvent;
    new(type: string, eventInitDict?: CommandEventInit): CommandEvent;
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Breaking Change Would introduce errors in existing code VS Code Tracked There is a VS Code equivalent to this issue
Projects
None yet
Development

No branches or pull requests

2 participants