Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Update filter type to allow synchronous filters #100

Merged
merged 2 commits into from
Jan 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lib/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,17 @@ export interface ServiceClientRequestFilter {
*/
request?: (
requestOptions: ServiceClientRequestOptions
) => Promise<ServiceClientResponse | ServiceClientRequestOptions>;
) =>
| ServiceClientResponse
| ServiceClientRequestOptions
| Promise<ServiceClientResponse | ServiceClientRequestOptions>;
/**
* This callback is called after the response has arrived.
* @throws {Error}
*/
response?: (
response: ServiceClientResponse
) => Promise<ServiceClientResponse>;
) => ServiceClientResponse | Promise<ServiceClientResponse>;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "perron",
"version": "0.11.2",
"version": "0.11.3",
"description": "A sane client for web services",
"engines": {
"node": ">=8.0.0"
Expand Down