-
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.3.0-dev.20210412 vs 4.2.4 #43651
Comments
I've done my best to look through the major gotchas and tag the right people.
@ahejlsberg looks like these may be a regressions from on-demand generic narrowing. Side note:
I think this one is caused by generic narrowing, but is a legit error.
I think this one is improved inference from generic narrowing.
@sandersn @orta this looks like a regression from #42424
lol
@andrewbranch you already put a fix in for this, right? Or is it still outstanding in some way? davidkpiano/xstate4 of 10 projects failed to build with the old tsc packages/xstate-inspect/tsconfig.json
@weswigham something something about substitution types? 😬 The Rome issues all look correct, but I'm surprised they're new. They all relate to spreading a |
@DanielRosenwasser #43599 should handle the one pointed my way. |
|
@orta I have really mixed feelings about #42424. On the one hand, a single break isn't that bad, and the workaround is casting |
Heh, I'm leaning toward not reverting. But not strongly. This change does force you to declare to the type system what you are expecting the result of those |
Well here's some data that I should have collected before merging:
The truth is that rarely logging an extra error in JS isn't that bad either. People with This is a big shrug for me, so I think I'll leave it. |
The following errors were reported by 4.3.0-dev.20210412, but not by 4.2.4
cdr/code-server
9 of 52 projects failed to build with the old tsc
lib/vscode/extensions/html-language-features/server/tsconfig.json
error TS2801: This condition will always return true since this 'Promise<import("/mnt/ts_downloads/code-server/lib/vscode/extensions/node_modules/typescript/lib/typescript").LanguageService>' appears to always be defined.
lib/vscode/extensions/typescript-language-features/tsconfig.json
error TS2801: This condition will always return true since this 'Promise<import("/mnt/ts_downloads/code-server/lib/vscode/extensions/typescript-language-features/src/typescriptService").ServerResponse.Response<protocol.Response>>' appears to always be defined.
lib/vscode/extensions/vscode-custom-editor-tests/tsconfig.json
error TS2339: Property 'document' does not exist on type 'never'.
lib/vscode/src/tsconfig.monaco.json
error TS2344: Type 'Target[K]' does not satisfy the constraint '(...args: any) => any'.
error TS2801: This condition will always return true since this 'Promise<void>' appears to always be defined.
ReactiveX/rxjs
7 of 11 projects failed to build with the old tsc
src/tsconfig.cjs.spec.json
error TS2769: No overload matches this call.
src/tsconfig.esm5.rollup.json
error TS2769: No overload matches this call.
typeorm/typeorm
tsconfig.json
error TS2801: This condition will always return true since this 'Promise<any>' appears to always be defined.
microsoft/playwright
2 of 4 projects failed to build with the old tsc
utils/generate_types/test/tsconfig.json
error TS7053: Element implicitly has an 'any' type because expression of type '"pageTarget"' can't be used to index type 'BrowserContext'.
error TS2322: Type 'true' is not assignable to type 'false'.
streamich/react-use
tsconfig.json
error TS2345: Argument of type 'Window | ListenerType1' is not assignable to parameter of type 'Window | null'.
react-hook-form/react-hook-form
2 of 4 projects failed to build with the old tsc
tsconfig.jest.json
error TS2739: Type '{}' is missing the following properties from type 'ControllerFieldState': invalid, isTouched, isDirty, isValidating
tsconfig.json
error TS2739: Type '{}' is missing the following properties from type 'ControllerFieldState': invalid, isTouched, isDirty, isValidating
react-navigation/react-navigation
example/tsconfig.json
error TS2578: Unused '@ts-expect-error' directive.
tsconfig.json
error TS2578: Unused '@ts-expect-error' directive.
excalidraw/excalidraw
2 of 4 projects failed to build with the old tsc
tsconfig-types.json
error TS2322: Type '({ id: string; x: number; y: number; strokeColor: string; backgroundColor: string; fillStyle: FillStyle; strokeWidth: number; strokeStyle: StrokeStyle; strokeSharpness: StrokeSharpness; ... 17 more ...; endArrowhead: Arrowhead | null; } & ElementUpdate<...> & { ...; }) | ... 4 more ... | ({ ...; } & ... 1 more ... &...' is not assignable to type 'TElement'.
tsconfig.json
error TS2322: Type '({ id: string; x: number; y: number; strokeColor: string; backgroundColor: string; fillStyle: FillStyle; strokeWidth: number; strokeStyle: StrokeStyle; strokeSharpness: StrokeSharpness; ... 17 more ...; endArrowhead: Arrowhead | null; } & ElementUpdate<...> & { ...; }) | ... 4 more ... | ({ ...; } & ... 1 more ... &...' is not assignable to type 'TElement'.
davidkpiano/xstate
4 of 10 projects failed to build with the old tsc
packages/xstate-inspect/tsconfig.json
error TS2344: Type 'Self[K]' does not satisfy the constraint '(...args: any) => any'.
packages/xstate-svelte/tsconfig.json
error TS2344: Type 'Self[K]' does not satisfy the constraint '(...args: any) => any'.
packages/xstate-test/tsconfig.json
error TS2344: Type 'Self[K]' does not satisfy the constraint '(...args: any) => any'.
packages/xstate-vue/tsconfig.json
error TS2344: Type 'Self[K]' does not satisfy the constraint '(...args: any) => any'.
rome/tools
tsconfig.json
error TS2345: Argument of type 'AnyNode' is not assignable to parameter of type 'Omit<Node, "type">'.
error TS2322: Type '{ loc: undefined; type: "HTMLDoctypeTag"; value: string; leadingComments?: string[] | undefined; trailingComments?: string[] | undefined; innerComments?: string[] | undefined; } | { loc: undefined; ... 7 more ...; innerComments?: string[] | undefined; } | ... 300 more ... | { ...; }' is not assignable to type 'T'.
error TS2322: Type '{ type: "HTMLDoctypeTag"; value: string; leadingComments?: string[] | undefined; trailingComments?: string[] | undefined; innerComments?: string[] | undefined; loc?: SourceLocation | undefined; } | ... 301 more ... | { ...; }' is not assignable to type 'T'.
error TS2322: Type '{ leadingComments: undefined; trailingComments: undefined; innerComments: undefined; type: "HTMLDoctypeTag"; value: string; loc?: SourceLocation | undefined; } | { leadingComments: undefined; ... 7 more ...; loc?: SourceLocation | undefined; } | ... 300 more ... | { ...; }' is not assignable to type 'T'.
error TS2322: Type '{ loc: SourceLocation; type: "HTMLDoctypeTag"; value: string; leadingComments?: string[] | undefined; trailingComments?: string[] | undefined; innerComments?: string[] | undefined; } | ... 301 more ... | { ...; }' is not assignable to type 'T & { loc: SourceLocation; }'.
error TS2345: Argument of type '{ relativeSegments: PathSegments; explicitDirectory: boolean; type: "absolute-windows-drive"; letter: "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | ... 14 more ... | "Z"; } | ... 5 more ... | { ...; }' is not assignable to parameter of type 'SuperParsed'.
error TS2345: Argument of type '{ relativeSegments: string[]; type: "absolute-windows-drive"; letter: "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | ... 5 more ... | "Z"; explicitDirectory: boolean; } | ... 5 more ... | { ...; }' is not assignable to parameter of type 'SuperParsed'.
error TS2345: Argument of type '{ explicitDirectory: true; relativeSegments: PathSegments; type: "absolute-windows-drive"; letter: "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | ... 13 more ... | "Z"; } | ... 5 more ... | { ...; }' is not assignable to parameter of type 'SuperParsed'.
error TS2345: Argument of type '{ explicitDirectory: false; type: "absolute-windows-drive"; letter: "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | ... 5 more ... | "Z"; relativeSegments: PathSegments; } | ... 5 more ... | { ...; }' is not assignable to parameter of type 'SuperParsed'.
sindresorhus/refined-github
tsconfig.json
error TS2339: Property 'getAttribute' does not exist on type 'Node'.
error TS2339: Property 'classList' does not exist on type 'Node'.
jquense/yup
1 of 2 projects failed to build with the old tsc
test/tsconfig.json
error TS2612: Property 'spec' will overwrite the base property in 'BaseSchema<TIn, TContext, TOut>'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration.
wangeditor-team/wangEditor
cypress/tsconfig.json
error TS2322: Type 'DomElement<DomElementSelector>' is not assignable to type 'DomElement<T>'.
error TS2409: Return type of constructor signature must be assignable to the instance type of the class.
error TS2322: Type 'HTMLElement[] | ChildNode[]' is not assignable to type 'HTMLElement[]'.
tsconfig.json
error TS2322: Type 'DomElement<DomElementSelector>' is not assignable to type 'DomElement<T>'.
error TS2409: Return type of constructor signature must be assignable to the instance type of the class.
error TS2322: Type 'HTMLElement[] | ChildNode[]' is not assignable to type 'HTMLElement[]'.
The text was updated successfully, but these errors were encountered: