# HG changeset patch # User cin # Date 2022-09-08 16:39:14 # Node ID 1e87acba35f3680ebdf49dd7fd6d1b0b58e06970 # Parent f715b707cb395aed9c1c36dcec973a4f43861f70 `dojo.store.api` replaced `dojo.promise.Promise` with `PromiseLike` type diff --git a/dojo-typings/readme.md b/dojo-typings/readme.md --- a/dojo-typings/readme.md +++ b/dojo-typings/readme.md @@ -11,6 +11,21 @@ The primary aims are ## Changes +### 1.0.3 + +Maintenance release + +* `dojo.store.api` replaced `dojo.promise.Promise` with `PromiseLike` type + +### 1.0.2 + +Maintenance release + +* added type parameter to `Evented`, `T` is the event map +* `_WidgetBase` `emit()` and `on()` are made more strict to accept only valid + event names, or explicit `any`. +* added `_setValueAttr` method to `_FormMixin` + ### 1.0.1 Maintenance release diff --git a/dojo-typings/src/main/typings/dojo/store.d.ts b/dojo-typings/src/main/typings/dojo/store.d.ts --- a/dojo-typings/src/main/typings/dojo/store.d.ts +++ b/dojo-typings/src/main/typings/dojo/store.d.ts @@ -1,4 +1,3 @@ -/// /// @@ -245,22 +244,22 @@ declare namespace dojo { /** * Retrieves an object by its identity */ - get(id: Identity): promise.Promise; + get(id: Identity): PromiseLike; /** * Stores an object */ - put(object: T, directives?: PutDirectives): promise.Promise; + put(object: T, directives?: PutDirectives): PromiseLike; /** * Creates an object, throws an error if the object already exists */ - add(object: T, directives?: PutDirectives): promise.Promise; + add(object: T, directives?: PutDirectives): PromiseLike; /** * Deletes an object by its identity */ - remove(id: string | number): promise.Promise; + remove(id: string | number): PromiseLike; } @@ -293,7 +292,7 @@ declare namespace dojo { /** * Retrieves an object by its identity */ - get(id: Identity): T | promise.Promise; + get(id: Identity): T | PromiseLike; /** * Stores an object @@ -308,7 +307,7 @@ declare namespace dojo { /** * Deletes an object by its identity */ - remove(id: Identity): void | promise.Promise; + remove(id: Identity): void | PromiseLike; } @@ -349,12 +348,12 @@ declare namespace dojo { /** * Remove the object with the specific id. */ - remove(id: api.Identity): promise.Promise; + remove(id: api.Identity): PromiseLike; /** * Remove the object with the given id from the underlying caching store. */ - evict(id: api.Identity): promise.Promise; + evict(id: api.Identity): PromiseLike; } interface Cache { @@ -475,7 +474,7 @@ declare namespace dojo { * Retrieves an object by its identity. This will trigger a GET request to the server using * the url `this.target + id`. */ - get(id: api.Identity, options?: { headers: Headers } | Headers): promise.Promise; + get(id: api.Identity, options?: { headers: Headers } | Headers): PromiseLike; /** * Defines the Accept header to use on HTTP requests @@ -486,18 +485,18 @@ declare namespace dojo { * Stores an object. This will trigger a PUT request to the server * if the object has an id, otherwise it will trigger a POST request. */ - put(object: T, options?: JsonRestPutDirectives): promise.Promise; + put(object: T, options?: JsonRestPutDirectives): PromiseLike; /** * Adds an object. This will trigger a PUT request to the server * if the object has an id, otherwise it will trigger a POST request. */ - add(object: T, options?: JsonRestPutDirectives): promise.Promise; + add(object: T, options?: JsonRestPutDirectives): PromiseLike; /** * Deletes an object by its identity. This will trigger a DELETE request to the server. */ - remove(id: api.Identity, options?: { headers?: Headers }): promise.Promise; + remove(id: api.Identity, options?: { headers?: Headers }): PromiseLike; }