-
-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
I'm submitting a feature request
- Library Version:
1.2.1
Current behavior:
cancel method exists only on the promise returned by send method. If then is called on this promise, the returned promise doesn't have cancel method.
@autoinject
export class BackendRepository {
constructor(private httpClient: HttpClient) {}
getItems(): Promise<Item[]> {
return this.httpClient.createRequest("/items").asGet().send()
.then((responseData: any) => responseData.data);
}
}In this example, HTTP response needs to be unwrapped from a response envelope to return proper types to TS app. But it can't be cancelled in upper layers of the TS app, where the request was triggered.
Expected/desired behavior:
-
What is the expected behavior?
The promise returned bythenshould havecancelmethod. -
What is the motivation / use case for changing the behavior?
To allow cancelling promises after callbacks are applied.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels