Skip to content

FormData definition is degraded #1074

Closed

Description

@falsandtru

FormData definition is updated at #337.

declare var FormData: {
    prototype: FormData;
    new (form?: HTMLFormElement): FormData;
}

But it degraded at a62e7d2.

declare var FormData: {
    prototype: FormData;
    new(): FormData;
}

Please recovery.

Activity

  1. added
    Bug
    on Nov 6, 2014
  2. added
    Domain: lib.d.ts
    on Dec 2, 2014
  3. theodorejb commented on Jan 27, 2015

    @theodorejb

    Hopefully this can be fixed soon, as out-of-the-box I get a "Supplied parameters do not match any signature of call target" error when attempting to instantiate FormData with a form element.

    I was able to work around the issue with the following code:

    interface FixedFormData {
        prototype: FormData;
        new (form?: HTMLFormElement): FormData;
    }
    
    var FixedFormData: FixedFormData = FormData;
    var formData = new FixedFormData(form); // no more error
  4. added
    Revisit
    on Jan 27, 2015
  5. agr commented on May 8, 2015

    @agr

    So, 1.5 is still in beta, and there is no way we get it until 1.6?

  6. danquirk commented on May 8, 2015

    @danquirk
    Member

    You can easily change/augment lib.d.ts yourself as necessary until the fix is in a version you can upgrade to.

  7. mhegazy commented on May 18, 2015

    @mhegazy
    Contributor

    Andrei Grigorev (@agr) once it is fixed you can just grab the latest lib file from: https://github.com/Microsoft/TypeScript/blob/master/bin/lib.d.ts and explicitly include it in your project.

  8. removed
    Revisit
    on Jul 1, 2015
  9. added
    Fixed
    on Jul 10, 2015
  10. agr commented on Jul 10, 2015

    @agr

    Hopefully it's the final fix :)

  11. locked and limited conversation to collaborators on Jun 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugDomain: lib.d.tsFixed

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ Proxy