From ebb735e35c99da5b3317f497e448c175d5fa3ae1 Mon Sep 17 00:00:00 2001 From: Yaacov Rydzinski Date: Fri, 16 Dec 2022 13:26:42 +0200 Subject: [PATCH] polish: narrow mapSourceToResponse return type ....it will never return a promise. --- 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; }