aurelia / http-client

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

invalid TypeScript declarations generated #110

Closed atsu85 closed 9 years ago

atsu85 commented 9 years ago

when i run npm install && gulp build i get invalid TypeScript declarations file that contains following invalid lines:

    abort(null): void;
    open(method: string, url: string, isAsync: boolean, user?: string, password?: stringnull): void;
    send(content?: anynull): void;

but instead these lines i'm expecting following lines to be copied without any modifications from the source: https://github.com/aurelia/http-client/blob/6a3f44a7eedd6d684ab8618592097bc2a705690b/src/request-message-processor.js#L62-L70

You can verify presence of errors using following command (tsc is TypeScript compiler - i'm using version 1.6.2, but it's not significant):

tsc dist\aurelia-http-client.d.ts

produces following output:

dist/aurelia-http-client.d.ts(57,11): error TS1138: Parameter declaration expected.
dist/aurelia-http-client.d.ts(57,15): error TS1005: ';' expected.
dist/aurelia-http-client.d.ts(57,16): error TS1128: Declaration or statement expected.
dist/aurelia-http-client.d.ts(57,22): error TS1109: Expression expected.
dist/aurelia-http-client.d.ts(58,16): error TS1005: ',' expected.
dist/aurelia-http-client.d.ts(58,29): error TS1005: ',' expected.
dist/aurelia-http-client.d.ts(58,46): error TS1005: ',' expected.
dist/aurelia-http-client.d.ts(58,62): error TS1109: Expression expected.
dist/aurelia-http-client.d.ts(58,81): error TS1109: Expression expected.
dist/aurelia-http-client.d.ts(58,94): error TS1005: ';' expected.
dist/aurelia-http-client.d.ts(58,100): error TS1109: Expression expected.
dist/aurelia-http-client.d.ts(59,18): error TS1109: Expression expected.
dist/aurelia-http-client.d.ts(59,28): error TS1005: ';' expected.
dist/aurelia-http-client.d.ts(59,34): error TS1109: Expression expected.
dist/aurelia-http-client.d.ts(666,1): error TS1128: Declaration or statement expected.
EisenbergEffect commented 9 years ago

We already have a fix in the new d.ts plugin. We are waiting to sync with them and the new babel release.