From 5bfb31384a422c922a7ec471839d2776b1092880 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Tue, 23 Mar 2021 22:37:20 -0500 Subject: [PATCH 1/2] feat: return AsyncGenerator --- src/subscription/mapAsyncIterator.d.ts | 4 ++-- src/subscription/subscribe.d.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/subscription/mapAsyncIterator.d.ts b/src/subscription/mapAsyncIterator.d.ts index ecf2e51cd3..fb031ba3bf 100644 --- a/src/subscription/mapAsyncIterator.d.ts +++ b/src/subscription/mapAsyncIterator.d.ts @@ -5,7 +5,7 @@ import { PromiseOrValue } from '../jsutils/PromiseOrValue'; * which produces values mapped via calling the callback function. */ export function mapAsyncIterator( - iterable: AsyncIterable, + iterable: AsyncIterable | AsyncGenerator, callback: (arg: T) => PromiseOrValue, rejectCallback?: (arg: any) => PromiseOrValue, -): any; // TS_SPECIFIC: AsyncGenerator requires typescript@3.6 +): AsyncGenerator; diff --git a/src/subscription/subscribe.d.ts b/src/subscription/subscribe.d.ts index 2dcfeed21e..46c00d3e92 100644 --- a/src/subscription/subscribe.d.ts +++ b/src/subscription/subscribe.d.ts @@ -39,7 +39,7 @@ export interface SubscriptionArgs { */ export function subscribe( args: SubscriptionArgs, -): Promise | ExecutionResult>; +): Promise | ExecutionResult>; /** * Implements the "CreateSourceEventStream" algorithm described in the From 79554f756b46078beeb56178f137dae3c86860a9 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Tue, 23 Mar 2021 22:54:26 -0500 Subject: [PATCH 2/2] build: sync integration test tsconfig with main tsconfig --- integrationTests/ts/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrationTests/ts/tsconfig.json b/integrationTests/ts/tsconfig.json index ea6266120c..03106e8e86 100644 --- a/integrationTests/ts/tsconfig.json +++ b/integrationTests/ts/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "module": "commonjs", - "lib": ["es6", "esnext.asynciterable"], + "lib": ["es2019", "es2020.string"], "strict": true, "noEmit": true, "types": []