aurelia / http-client

A simple, restful, message-based wrapper around XMLHttpRequest.
MIT License
62 stars 59 forks source link

TypeScript Definition error #94

Closed KarlDirck closed 9 years ago

KarlDirck commented 9 years ago

Aurelia "http-client@0.10.3" has an issue in the generated 'aurelia-http-client.d.ts' file on lines 17 & 18: Starting at line 8

  export interface XHR {
    status: number;
    statusText: string;
    response: any;
    responseText: string;
    onload: Function;
    ontimeout: Function;
    onerror: Function;
    onabort: Function;
    abort(): undefined; // should be void
    send(content?: any): undefined; // should be void
  }

Which results in the following TS error:

(...)/typings/aurelia/aurelia-http-client.d.ts(17,14): error TS2304: Cannot find name 'undefined'.
(...)/typings/aurelia/aurelia-http-client.d.ts(18,26): error TS2304: Cannot find name 'undefined'.
EisenbergEffect commented 9 years ago

This will be fixed in the next release. We've fixed the generator.