Repository navigation
[NewErrors] 4.5.0-dev.20210912 vs 4.4.3 #45846
Description
Activity
andrewbranch commented
on Sep 13, 2021 MemberMore actionsMost of these are from #45350—Ron Buckton (@rbuckton), you’ll probably want to take a look at some of the assignability errors mentioning
Awaited. There are a couple type argument issues but those seem trivial to fix. It’s more important to understand the others and see if they have easy fixes too.Regarding extensions/github/src/pushErrorHandler.ts#L106: It looks like the call to
withProgressat line 32 was previously returning a tuple type of[Octokit, ReposCreateForkResponseData], but is now returning(Octokit | ReposCreateForkResponseData)[]. If we were previously inferring a tuple here, but aren't due to the change toawaitthen that's definitely a bug.It looks like extensions/github/src/pushErrorHandler.ts#L106 is due to #45719 since we're no longer inferring the type arguments as a tuple due to the binding pattern.
For VS Code:
- extensions/github/src/pushErrorHandler.ts#L106 - Due to removal of binding patterns as inference sources in Stop looking at binding patterns for type argument inference #45719.
- Easiest correct fix is to add
as constto line 85
- Easiest correct fix is to add
- src/vs/base/parts/quickinput/browser/quickInput.ts#L1472-1478 - Due to
Promise.alloverload removal in Adds 'Awaited' type alias and updates to Promise.all/race/allSettled/any #45350. - src/vs/platform/diagnostics/node/diagnosticsService.ts#L243-244 - Due to
Promise.alloverload removal in Adds 'Awaited' type alias and updates to Promise.all/race/allSettled/any #45350.
I'll look into the others shortly.
- extensions/github/src/pushErrorHandler.ts#L106 - Due to removal of binding patterns as inference sources in Stop looking at binding patterns for type argument inference #45719.
Matt Bierner (@mjbvz) I saw that you updated pushErrorHandler.ts for TS 4.5 using an
as anyon line 107I would recommend you add
as conston line 85 instead to preserve type safety. We are no longer treating untyped binding patterns as type argument inference sources as of #45719.Ron Buckton (@rbuckton) Ah nice! Just made the change. Thanks for the help as I was super confused by the error
For youzan/vant:
- packages/create-vant-cli-app/src/index.ts#L20 - Due to removal of binding patterns as inference sources in Stop looking at binding patterns for type argument inference #45719.
- Recommended solution is to add a type annotation on line 17.
- packages/create-vant-cli-app/src/index.ts#L22 - Due to removal of binding patterns as inference sources in Stop looking at binding patterns for type argument inference #45719.
For lensapp/lens:
- src/common/k8s-api/endpoints/metrics.api.ts#L85 - Due to an inference issue in Adds 'Awaited' type alias and updates to Promise.all/race/allSettled/any #45350 as a result of
getAwaitedTypereturning anAwaited<T>instantiation when checking return statements.
- packages/create-vant-cli-app/src/index.ts#L20 - Due to removal of binding patterns as inference sources in Stop looking at binding patterns for type argument inference #45719.
I'm unsure as to the cause of the errors in react-redux, but they don't seem to be due to
await->Awaited<T>change as far as I can tell.Ah, the issue with react-redux is also due to #45719:
We're no longer inferring a tuple type for the return statement because we don't infer a contextual type from the binding pattern. This seems like an unfortunate loss due to that change:
declare const f: <T>(cb: () => T) => T; const [a, b, c] = f(() => [1, "hi", true]);
vs
andrewbranch commented
on Sep 17, 2021 MemberMore actionsHm, there are so many cases where binding patterns as an inference source are so bad, but these tuple cases are kind of disappointing. Maybe I can bring that back for tuples. It's a lot more suspicious to say that an object binding pattern implies the presence of some properties on an otherwise
unknowntype than it is to say that an array binding pattern implies that an array literal should be interpreted as a tuple.andrewbranch commented
on Sep 23, 2021 MemberMore actionsRon fixed the
Awaitedissues and I rolled back the binding pattern changes for now (see design notes linked above). Matt Bierner (@mjbvz), you should be able to roll back theas constchanges you had to do if you want.- locked as resolved and limited conversation to collaborators
on Oct 21, 2025



The following errors were reported by 4.5.0-dev.20210912, but not by 4.4.3
microsoft/vscode
2 of 51 projects failed to build with the old tsc
extensions/github/tsconfig.json
error TS2339: Property 'pulls' does not exist on type '({ [x: string]: any; } & { [x: string]: any; } & Octokit & void & { paginate: PaginateInterface; } & RestEndpointMethods) | ReposCreateForkResponseData'.src/tsconfig.json
error TS2558: Expected 1 type arguments, but got 2.error TS2322: Type 'IQuickPickSeparator | Awaited<T>' is not assignable to type 'T | undefined'.error TS2322: Type 'IQuickPickSeparator | Awaited<T>' is not assignable to type 'readonly (IQuickPickSeparator | T)[]'.error TS2339: Property 'filter' does not exist on type 'IQuickPickSeparator | Awaited<T>'.error TS7006: Parameter 'item' implicitly has an 'any' type.error TS2488: Type '{ name: string; cmd: string; pid: number; ppid: number; load: number; mem: number; children?: ProcessItem[] | undefined; }' must have a '[Symbol.iterator]()' method that returns an iterator.src/tsconfig.monaco.json
error TS2558: Expected 1 type arguments, but got 2.error TS2322: Type 'IQuickPickSeparator | Awaited<T>' is not assignable to type 'T | undefined'.error TS2322: Type 'IQuickPickSeparator | Awaited<T>' is not assignable to type 'readonly (IQuickPickSeparator | T)[]'.error TS2339: Property 'filter' does not exist on type 'IQuickPickSeparator | Awaited<T>'.error TS7006: Parameter 'item' implicitly has an 'any' type.src/tsconfig.tsec.json
error TS2558: Expected 1 type arguments, but got 2.error TS2322: Type 'IQuickPickSeparator | Awaited<T>' is not assignable to type 'T | undefined'.error TS2322: Type 'IQuickPickSeparator | Awaited<T>' is not assignable to type 'readonly (IQuickPickSeparator | T)[]'.error TS2339: Property 'filter' does not exist on type 'IQuickPickSeparator | Awaited<T>'.error TS7006: Parameter 'item' implicitly has an 'any' type.error TS2488: Type '{ name: string; cmd: string; pid: number; ppid: number; load: number; mem: number; children?: ProcessItem[] | undefined; }' must have a '[Symbol.iterator]()' method that returns an iterator.reduxjs/react-redux
test/typetests/tsconfig.json
error TS2322: Type 'Context<ReactReduxContextValue<any, AnyAction> | null> | MutableRefObject<unknown> | ((instance: unknown) => void) | Omit<...>' is not assignable to type 'Context<ReactReduxContextValue<any, AnyAction> | null>'.error TS2339: Property 'Consumer' does not exist on type 'Context<ReactReduxContextValue<any, AnyAction> | null> | MutableRefObject<unknown> | ((instance: unknown) => void) | Omit<...>'.tsconfig.json
error TS2322: Type 'Context<ReactReduxContextValue<any, AnyAction> | null> | MutableRefObject<unknown> | ((instance: unknown) => void) | Omit<...>' is not assignable to type 'Context<ReactReduxContextValue<any, AnyAction> | null>'.error TS2339: Property 'Consumer' does not exist on type 'Context<ReactReduxContextValue<any, AnyAction> | null> | MutableRefObject<unknown> | ((instance: unknown) => void) | Omit<...>'.youzan/vant
2 of 9 projects failed to build with the old tsc
packages/create-vant-cli-app/tsconfig.json
error TS2769: No overload matches this call.error TS2345: Argument of type '{}' is not assignable to parameter of type 'string'.lensapp/lens
4 of 5 projects failed to build with the old tsc
tsconfig.json
error TS2322: Type 'IMetrics | Awaited<T> | Awaited<{ [K in keyof T]: IMetrics; }>' is not assignable to type 'T extends object ? { [K in keyof T]: IMetrics; } : IMetrics'.