From baf11a551875b6560869ba2086e466525b34675b Mon Sep 17 00:00:00 2001 From: Yaacov Rydzinski Date: Mon, 19 Dec 2022 20:08:47 +0200 Subject: [PATCH] polish: narrow mapSourceToResponse return type (#3801) --- src/execution/execute.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/execution/execute.ts b/src/execution/execute.ts index ebb9116b23..a7ff5ce607 100644 --- a/src/execution/execute.ts +++ b/src/execution/execute.ts @@ -1678,7 +1678,7 @@ async function* ensureAsyncIterable( function mapSourceToResponse( exeContext: ExecutionContext, resultOrStream: ExecutionResult | AsyncIterable, -): PromiseOrValue< +): | AsyncGenerator< | ExecutionResult | InitialIncrementalExecutionResult @@ -1686,8 +1686,7 @@ function mapSourceToResponse( void, void > - | ExecutionResult -> { + | ExecutionResult { if (!isAsyncIterable(resultOrStream)) { return resultOrStream; }