Skip to content

Commit ebb735e

Browse files
committed
polish: narrow mapSourceToResponse return type
....it will never return a promise.
1 parent 1564174 commit ebb735e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/execution/execute.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1678,16 +1678,15 @@ async function* ensureAsyncIterable(
16781678
function mapSourceToResponse(
16791679
exeContext: ExecutionContext,
16801680
resultOrStream: ExecutionResult | AsyncIterable<unknown>,
1681-
): PromiseOrValue<
1681+
):
16821682
| AsyncGenerator<
16831683
| ExecutionResult
16841684
| InitialIncrementalExecutionResult
16851685
| SubsequentIncrementalExecutionResult,
16861686
void,
16871687
void
16881688
>
1689-
| ExecutionResult
1690-
> {
1689+
| ExecutionResult {
16911690
if (!isAsyncIterable(resultOrStream)) {
16921691
return resultOrStream;
16931692
}

0 commit comments

Comments
 (0)