You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since typescript 4.1, the promise resolution typing has changed.
This change is documented here and well known.
Reproduction steps
Opened the following branch to demonstrate the issue.
Running npm install or npm run compile
> @grpc/[email protected] compile /Users/florentvilmart/src/grpc/grpc-node/packages/grpc-js
> tsc -p .
src/call-credentials.ts:118:23 - error TS2345: Argument of type '{ [index: string]: string; } | undefined' is not assignable to parameter of type '{ [index: string]: string; } | PromiseLike<{ [index: string]: string; }>'.
Type 'undefined' is not assignable to type '{ [index: string]: string; } | PromiseLike<{ [index: string]: string; }>'.
118 resolve(headers);
~~~~~~~
src/server-call.ts:511:13 - error TS2794: Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'?
511 resolve();
~~~~~~~~~
node_modules/typescript/lib/lib.es2015.promise.d.ts:33:34
33 new <T>(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
~~~~~~~~~~~~~~~~~~~~~~~~~
An argument for 'value' was not provided.
src/server-call.ts:518:11 - error TS2794: Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'?
518 resolve();
~~~~~~~~~
node_modules/typescript/lib/lib.es2015.promise.d.ts:33:34
33 new <T>(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
~~~~~~~~~~~~~~~~~~~~~~~~~
An argument for 'value' was not provided.
Problem description
Since typescript 4.1, the promise resolution typing has changed.
This change is documented here and well known.
Reproduction steps
Opened the following branch to demonstrate the issue.
Running
npm install
ornpm run compile
Environment
The text was updated successfully, but these errors were encountered: