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

Add FormDataEvent #36217

Closed
naokikimura opened this issue Jan 16, 2020 · 3 comments
Closed

Add FormDataEvent #36217

naokikimura opened this issue Jan 16, 2020 · 3 comments
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript
Milestone

Comments

@naokikimura
Copy link

TypeScript Version: Nightly

Search Terms:

  • FormDataEvent
  • HTMLFormElement: formdata event
  • GlobalEventHandlers.onformdata

Expected behavior:

No errors. Behave as specified by WHATWG.

Actual behavior:

Error Cannot find name 'FormDataEvent'.(2304)

Related Issues:

Code

let e: FormDataEvent;
Output
"use strict";
let e;
Compiler Options
{
  "compilerOptions": {
    "noImplicitAny": true,
    "strictNullChecks": true,
    "strictFunctionTypes": true,
    "strictPropertyInitialization": true,
    "strictBindCallApply": true,
    "noImplicitThis": true,
    "noImplicitReturns": true,
    "useDefineForClassFields": false,
    "alwaysStrict": true,
    "allowUnreachableCode": false,
    "allowUnusedLabels": false,
    "downlevelIteration": false,
    "noEmitHelpers": false,
    "noLib": false,
    "noStrictGenericChecks": false,
    "noUnusedLocals": false,
    "noUnusedParameters": false,
    "esModuleInterop": true,
    "preserveConstEnums": false,
    "removeComments": false,
    "skipLibCheck": false,
    "checkJs": false,
    "allowJs": false,
    "declaration": true,
    "experimentalDecorators": false,
    "emitDecoratorMetadata": false,
    "target": "ES2017",
    "module": "ESNext"
  }
}

Playground Link: Provided

@RyanCavanaugh RyanCavanaugh added Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript labels Feb 6, 2020
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Feb 6, 2020
@adriengibrat
Copy link
Contributor

adriengibrat commented Mar 18, 2020

interface FormDataEvent extends Event {
    readonly formData: FormData;
};
interface FormDataEventInit extends EventInit {
    formData: FormData;
};
declare var FormDataEvent: {
    prototype: FormDataEvent;
    new(type: string, eventInitDict?: FormDataEventInit): FormDataEvent;
};

@meidlinga
Copy link

Hello,

is there any ETA for this issue?

@jakebailey
Copy link
Member

This was pulled into main in #44684, so is present in TS 4.4 and above. Playground Link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript
Projects
None yet
Development

No branches or pull requests

5 participants