Skip to content

Commit

Permalink
polish: narrow mapSourceToResponse return type
Browse files Browse the repository at this point in the history
....it will never return a promise.
  • Loading branch information
yaacovCR committed Dec 16, 2022
1 parent 1564174 commit ebb735e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/execution/execute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1678,16 +1678,15 @@ async function* ensureAsyncIterable(
function mapSourceToResponse(
exeContext: ExecutionContext,
resultOrStream: ExecutionResult | AsyncIterable<unknown>,
): PromiseOrValue<
):
| AsyncGenerator<
| ExecutionResult
| InitialIncrementalExecutionResult
| SubsequentIncrementalExecutionResult,
void,
void
>
| ExecutionResult
> {
| ExecutionResult {
if (!isAsyncIterable(resultOrStream)) {
return resultOrStream;
}
Expand Down

0 comments on commit ebb735e

Please sign in to comment.