-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NewErrors] 4.5.0-dev.20210912 vs 4.4.3 #45846
Comments
Regarding extensions/github/src/pushErrorHandler.ts#L106: It looks like the call to |
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:
I'll look into the others shortly. |
@rbuckton Ah nice! Just made the change. Thanks for the help as I was super confused by the error |
For youzan/vant:
For lensapp/lens:
|
I'm unsure as to the cause of the errors in react-redux, but they don't seem to be due to |
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 |
Hm, 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 |
Ron fixed the |
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'.
The text was updated successfully, but these errors were encountered: