Skip to content

Commit 4619c42

Browse files
authored
Update and/or configure type declarations. (#314)
1 parent 65af927 commit 4619c42

File tree

5 files changed

+112
-124
lines changed

5 files changed

+112
-124
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ before_script:
66
- >-
77
npm run update-types && git diff --exit-code || (echo -e
88
'\n\033[31mERROR:\033[0m Typings are stale. Please run "npm run
9-
update-types".' &&false)
9+
update-types".' && false)
1010
env:
1111
global:
1212
- secure: >-

iron-ajax.d.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
* element.
3434
*/
3535
interface IronAjaxElement extends Polymer.Element {
36-
hostAttributes: object|null;
3736

3837
/**
3938
* The URL target of the request.
@@ -211,34 +210,35 @@ interface IronAjaxElement extends Polymer.Element {
211210
bubbles: boolean|null|undefined;
212211

213212
/**
214-
* Changes the [`completes`](iron-request#property-completes) promise chain
213+
* Changes the [`completes`](iron-request#property-completes) promise chain
215214
* from `generateRequest` to reject with an object
216215
* containing the original request, as well an error message.
217216
* If false (default), the promise rejects with an error message only.
218217
*/
219218
rejectWithRequest: boolean|null|undefined;
220219
_boundHandleResponse: Function|null|undefined;
220+
hostAttributes: object|null;
221221

222222
/**
223223
* The query string that should be appended to the `url`, serialized from
224224
* the current value of `params`.
225225
*/
226-
queryString: object|null;
226+
readonly queryString: string;
227227

228228
/**
229229
* The `url` with query string (if `params` are specified), suitable for
230230
* providing to an `iron-request` instance.
231231
*/
232-
requestUrl: object|null;
232+
readonly requestUrl: string;
233233

234234
/**
235235
* An object that maps header names to header values, first applying the
236236
* the value of `Content-Type` and then overlaying the headers specified
237237
* in the `headers` property.
238238
*/
239-
requestHeaders: object|null;
240-
created(): any;
241-
_onProgressChanged(event: any): any;
239+
readonly requestHeaders: object|null;
240+
created(): void;
241+
_onProgressChanged(event: any): void;
242242

243243
/**
244244
* Request options suitable for generating an `iron-request` instance based
@@ -250,10 +250,10 @@ interface IronAjaxElement extends Polymer.Element {
250250
* Performs an AJAX request to the specified URL.
251251
*/
252252
generateRequest(): IronRequestElement;
253-
_handleResponse(request: any): any;
254-
_handleError(request: any, error: any): any;
255-
_discardRequest(request: any): any;
256-
_requestOptionsChanged(): any;
253+
_handleResponse(request: any): void;
254+
_handleError(request: any, error: any): void;
255+
_discardRequest(request: any): void;
256+
_requestOptionsChanged(): void;
257257
}
258258

259259
interface HTMLElementTagNameMap {

iron-request.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
* this.$.xhr.send({url: url, body: params});
1919
*/
2020
interface IronRequestElement extends Polymer.Element {
21-
hostAttributes: object|null;
2221

2322
/**
2423
* A reference to the XMLHttpRequest instance used to generate the
@@ -74,6 +73,7 @@ interface IronRequestElement extends Polymer.Element {
7473
* TimedOut will be true if the XHR threw a timeout event.
7574
*/
7675
readonly timedOut: boolean|null|undefined;
76+
hostAttributes: object|null;
7777

7878
/**
7979
* Succeeded is true if the request succeeded. The request succeeded if it
@@ -83,7 +83,7 @@ interface IronRequestElement extends Polymer.Element {
8383
* The status code 0 is accepted as a success because some schemes - e.g.
8484
* file:// - don't provide status codes.
8585
*/
86-
succeeded: object|null;
86+
readonly succeeded: boolean;
8787

8888
/**
8989
* Sends an HTTP request to the server and returns a promise (see the `completes`
@@ -118,7 +118,7 @@ interface IronRequestElement extends Polymer.Element {
118118
/**
119119
* Aborts the request.
120120
*/
121-
abort(): any;
121+
abort(): void;
122122

123123
/**
124124
* @param body The given body of the request to try and encode.
@@ -144,7 +144,7 @@ interface IronRequestElement extends Polymer.Element {
144144
/**
145145
* Updates the status code and status text.
146146
*/
147-
_updateStatus(): any;
147+
_updateStatus(): void;
148148
}
149149

150150
interface HTMLElementTagNameMap {

0 commit comments

Comments
 (0)