TypeScript
TypeScript copied to clipboard
lib Fix Part 6/6 – Array.isArray
General Information
PR separated out from #49855, because there might be some members expecting smaller PRs. As mentioned in the comments from the big PR, whether to review a single, large PR or 6 smaller PRs is up to the TypeScript Team to decide. I couldn't have found a better way for this; hopefully this will not bring any trouble to the Team.
This PR partially fixes #49773. For details and the track list about the changes, please see #49773.
Part 6/6, Array.isArray
Fix #17002 Actually fix #32497 Fix #33700 Fix #41808 Actually fix #43247
This PR supersedes #48228 as it fails to address readonly number[].
~I am confident to this solution.~
Edit: I guess I must retract this. See the results below. 😔
@typescript-bot run dt @typescript-bot test top100 @typescript-bot user test this
Heya @sandersn, I've started to run the diff-based top-repos suite on this PR at f660c258ba550032b3eb8d43ad2373e572825fad. You can monitor the build here.
Update: The results are in!
Heya @sandersn, I've started to run the parallelized Definitely Typed test suite on this PR at f660c258ba550032b3eb8d43ad2373e572825fad. You can monitor the build here.
Heya @sandersn, I've started to run the diff-based user code test suite on this PR at f660c258ba550032b3eb8d43ad2373e572825fad. You can monitor the build here.
Update: The results are in!
We tried this a couple of years ago; I don't remember what problems it ran into but I don't think #48228 was the only attempt.
@sandersn Here are the results of running the user test suite comparing main and refs/pull/50454/merge:
Something interesting changed - please have a look.
Details
webpack
tsconfig.json
- [NEW]
error TS2339: Property 'length' does not exist on type 'T[P] extends any ? Extract<true extends false & T[P] ? any[] : T[P] extends readonly any[] ? T[P] : T[P] extends string ? never : T[P] extends ArrayLike<...> | Iterable<...> ? U[] : unknown[], T[P]> : never'. - [NEW]
error TS2339: Property 'slice' does not exist on type 'T[P] extends any ? Extract<true extends false & T[P] ? any[] : T[P] extends readonly any[] ? T[P] : T[P] extends string ? never : T[P] extends ArrayLike<...> | Iterable<...> ? U[] : unknown[], T[P]> : never'.
tsconfig.types.json
- [NEW]
error TS7053: Element implicitly has an 'any' type because expression of type 'number' can't be used to index type '(T[P] & null extends any ? Extract<T[P] & null extends readonly any[] ? T[P] & null : T[P] & null extends string ? never : T[P] & null extends ArrayLike<...> | Iterable<...> ? U[] : unknown[], T[P] & null> : never) | (T[P] & {} extends any ? Extract<...> : never)'. - [NEW]
error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'Object'. - [MISSING]
error TS2345: Argument of type '{ _index: number; type: string; constructor?: Function | undefined; toString?: (() => string) | undefined; toLocaleString?: (() => string) | undefined; valueOf?: (() => Object) | undefined; hasOwnProperty?: ((v: PropertyKey) => boolean) | undefined; isPrototypeOf?: ((v: Object) => boolean) | undefined; propertyIsEnu...' is not assignable to parameter of type 'Object'.
@sandersn Here are the results of running the top-repos suite comparing main and refs/pull/50454/merge:
Something interesting changed - please have a look.
Details
cheeriojs/cheerio
1 of 2 projects failed to build with the old tsc and were ignored
tsconfig.json
error TS2322: Type 'ChildNode[] | (S extends any ? Extract<true extends false & S ? any[] : S extends readonly any[] ? S : S extends string ? never : S extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], S> : never) | T[] | (NonNullable<...> extends any ? Extract<...> : never) | undefined' is not assignable to type 'AnyNode[] | undefined'.
conwnet/github1s
2 of 4 projects failed to build with the old tsc and were ignored
extensions/github1s/tsconfig.json
error TS2322: Type 'T[] | (T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never)' is not assignable to type 'T[]'.
excalidraw/excalidraw
3 of 5 projects failed to build with the old tsc and were ignored
tsconfig-types.json
error TS2322: Type 'readonly (readonly [number, number])[] | number[][]' is not assignable to type 'readonly (readonly [number, number])[]'.
graphql/graphql-js
1 of 2 projects failed to build with the old tsc and were ignored
tsconfig.json
error TS2339: Property 'map' does not exist on type 'never'.error TS2345: Argument of type 'readonly ASTNode[] | undefined' is not assignable to parameter of type 'ASTNode[] | undefined'.
JedWatson/react-select
3 of 5 projects failed to build with the old tsc and were ignored
packages/react-select/src/tests/tsconfig.json
error TS7053: Element implicitly has an 'any' type because expression of type 'number' can't be used to index type '(OnChangeValue<Option, IsMulti> extends any ? Extract<true extends false & OnChangeValue<Option, IsMulti> ? any[] : OnChangeValue<...> extends readonly any[] ? OnChangeValue<...> : OnChangeValue<...> extends string ? never : OnChangeValue<...> extends ArrayLike<...> | Iterable<...> ? U[] : unknown[], OnChangeValue<....'.error TS2339: Property 'length' does not exist on type '(OnChangeValue<Option, IsMulti> extends any ? Extract<true extends false & OnChangeValue<Option, IsMulti> ? any[] : OnChangeValue<...> extends readonly any[] ? OnChangeValue<...> : OnChangeValue<...> extends string ? never : OnChangeValue<...> extends ArrayLike<...> | Iterable<...> ? U[] : unknown[], OnChangeValue<....'.
microsoft/playwright
4 of 10 projects failed to build with the old tsc and were ignored
packages/html-reporter/tsconfig.json
error TS2322: Type 'string | string[] | ({ name?: NameOrSegments | undefined; } & T extends any ? Extract<true extends false & { name?: NameOrSegments | undefined; } & T ? any[] : { ...; } & T extends readonly any[] ? { ...; } & T : { ...; } & T extends string ? never : { ...; } & T extends ArrayLike<...> | Iterable<...> ? U[] : unknow...' is not assignable to type 'NameOrSegments | undefined'.
microsoft/vscode
3 of 54 projects failed to build with the old tsc and were ignored
extensions/ipynb/tsconfig.json
error TS2345: Argument of type 'unknown[]' is not assignable to parameter of type 'string | string[]'.
extensions/markdown-language-features/tsconfig.browser.json
error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string'.
extensions/markdown-language-features/tsconfig.json
error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string'.
extensions/vscode-colorize-tests/tsconfig.json
error TS2571: Object is of type 'unknown'.
src/tsconfig.json
error TS2322: Type 'any[] | unknown[]' is not assignable to type '(HTMLElement | Record<string, HTMLElement>)[] | undefined'.error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string'.error TS2571: Object is of type 'unknown'.error TS2322: Type '{ data: { label: unknown; score: FuzzyScore; }; visibility: TreeVisibility.Visible | TreeVisibility.Recurse; }' is not assignable to type 'TreeFilterResult<FuzzyScore | LabelFuzzyScore>'.error TS2339: Property 'map' does not exist on type 'T[] | (T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never)'.error TS2322: Type 'T[] | (T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never)' is not assignable to type 'T[]'.error TS2488: Type 'T[] | (T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never)' must have a '[Symbol.iterator]()' method that returns an iterator.error TS2339: Property 'join' does not exist on type 'never'.error TS2322: Type 'unknown[]' is not assignable to type 'ITerminalInstance[]'.error TS2769: No overload matches this call.error TS2322: Type 'unknown[]' is not assignable to type 'string[]'.
src/tsconfig.monaco.json
error TS2322: Type 'any[] | unknown[]' is not assignable to type '(HTMLElement | Record<string, HTMLElement>)[] | undefined'.error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string'.error TS2571: Object is of type 'unknown'.error TS2322: Type '{ data: { label: unknown; score: FuzzyScore; }; visibility: TreeVisibility.Visible | TreeVisibility.Recurse; }' is not assignable to type 'TreeFilterResult<FuzzyScore | LabelFuzzyScore>'.error TS2339: Property 'map' does not exist on type 'T[] | (T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never)'.error TS2322: Type 'T[] | (T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never)' is not assignable to type 'T[]'.
src/tsconfig.tsec.json
error TS2322: Type 'any[] | unknown[]' is not assignable to type '(HTMLElement | Record<string, HTMLElement>)[] | undefined'.error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string'.error TS2571: Object is of type 'unknown'.error TS2322: Type '{ data: { label: unknown; score: FuzzyScore; }; visibility: TreeVisibility.Visible | TreeVisibility.Recurse; }' is not assignable to type 'TreeFilterResult<FuzzyScore | LabelFuzzyScore>'.error TS2339: Property 'map' does not exist on type 'T[] | (T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never)'.error TS2322: Type 'T[] | (T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never)' is not assignable to type 'T[]'.error TS2488: Type 'T[] | (T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never)' must have a '[Symbol.iterator]()' method that returns an iterator.error TS2339: Property 'join' does not exist on type 'never'.error TS2322: Type 'unknown[]' is not assignable to type 'ITerminalInstance[]'.error TS2769: No overload matches this call.error TS2322: Type 'unknown[]' is not assignable to type 'string[]'.
mobxjs/mobx
7 of 9 projects failed to build with the old tsc and were ignored
packages/mobx/tsconfig.json
error TS2322: Type 'this' is not assignable to type 'void'.
neoclide/coc.nvim
tsconfig.json
error TS2339: Property 'length' does not exist on type 'T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never'.error TS2322: Type 'T[] | (T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never)' is not assignable to type 'T[]'.
pnpm/pnpm
119 of 120 projects failed to build with the old tsc and were ignored
packages/pnpm/tsconfig.json
error TS2322: Type 'unknown[]' is not assignable to type 'string[]'.
prisma/prisma
57 of 67 projects failed to build with the old tsc and were ignored
packages/engines/tsconfig.build.json
error TS2345: Argument of type 'unknown[] | string[]' is not assignable to parameter of type 'string[]'.
react-hook-form/react-hook-form
2 of 3 projects failed to build with the old tsc and were ignored
tsconfig.json
error TS2339: Property 'forEach' does not exist on type 'Path<TFieldValues>[] | readonly Path<TFieldValues>[] | (Path<TFieldValues> extends any ? Extract<true extends false & Path<...> ? any[] : Path<...> extends readonly any[] ? Path<...> : Path<...> extends string ? never : Path<...> extends ArrayLike<...> | Iterable<...> ? U[] : unknown[], Path<...>> : never) | (Path<....'.error TS7006: Parameter 'inputName' implicitly has an 'any' type.error TS2345: Argument of type 'string | Path<TFieldValues> | Path<TFieldValues>[] | readonly Path<TFieldValues>[]' is not assignable to parameter of type 'string'.- src/logic/createFormControl.ts#L894
- src/logic/createFormControl.ts#L895
- src/logic/createFormControl.ts#L897
- src/logic/createFormControl.ts#L899
- src/logic/createFormControl.ts#L900
- src/logic/createFormControl.ts#L903
- src/logic/createFormControl.ts#L904
- src/logic/createFormControl.ts#L905
- src/logic/createFormControl.ts#L908
error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '(U & object) | (U extends any ? Extract<true extends false & U ? any[] : U extends readonly any[] ? U : U extends string ? never : U extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], U> : never)'.error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '(U & object) | (U extends any ? Extract<true extends false & U ? any[] : U extends readonly any[] ? U : U extends string ? never : U extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], U> : never)'.error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '(T & object) | (T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never)'.error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '(T & object) | (T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never)'.error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'unknown'.error TS2339: Property 'startsWith' does not exist on type 'string | string[]'.error TS2345: Argument of type 'string | string[]' is not assignable to parameter of type 'string'.error TS2339: Property 'map' does not exist on type 'Partial<FieldArray<TFieldValues, TFieldArrayName>> | Partial<FieldArray<TFieldValues, TFieldArrayName>>[] | (Partial<...> | Partial<...>[])[] | (Partial<...> & any[]) | (Partial<...> & unknown[])'.error TS2488: Type 'Partial<FieldArray<TFieldValues, TFieldArrayName>>[] | (Partial<FieldArray<TFieldValues, TFieldArrayName>> extends any ? Extract<...> : never) | (Partial<...> | Partial<...>[])[]' must have a '[Symbol.iterator]()' method that returns an iterator.error TS2488: Type 'T[] | (T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never) | (T | T[])[]' must have a '[Symbol.iterator]()' method that returns an iterator.error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '(T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never) | (T & object)'.error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '(T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never) | (T & object)'.error TS2339: Property 'map' does not exist on type 'T[] | (T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never)'.error TS2488: Type 'T[] | (T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never) | (T | ... 1 more ... | undefined)[]' must have a '[Symbol.iterator]()' method that returns an iterator.
ReactiveX/rxjs
8 of 13 projects failed to build with the old tsc and were ignored
src/tsconfig.cjs.spec.json
error TS2322: Type 'T[] | (T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never) | (O extends any ? Extract<...> : never)' is not assignable to type 'T[]'.error TS2322: Type 'T[] | (T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never)' is not assignable to type 'T[]'.error TS2548: Type 'T[] | (T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never)' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator.
src/tsconfig.esm5.rollup.json
error TS2322: Type 'T[] | (T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never) | (O extends any ? Extract<...> : never)' is not assignable to type 'T[]'.error TS2322: Type 'T[] | (T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never)' is not assignable to type 'T[]'.error TS2548: Type 'T[] | (T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never)' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator.
src/tsconfig.types.json
error TS2322: Type 'T[] | (T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never) | (O extends any ? Extract<...> : never)' is not assignable to type 'T[]'.error TS2488: Type 'T[] | (T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never)' must have a '[Symbol.iterator]()' method that returns an iterator.error TS2322: Type 'T[] | (T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never)' is not assignable to type 'T[]'.
refined-github/refined-github
tsconfig.json
error TS2322: Type 'Item[] | (Item extends any ? Extract<true extends false & Item ? any[] : Item extends readonly any[] ? Item : Item extends string ? never : Item extends ArrayLike<...> | Iterable<...> ? U[] : unknown[], Item> : never)' is not assignable to type 'Item[]'.
statelyai/xstate
6 of 20 projects failed to build with the old tsc and were ignored
packages/xstate-inspect/tsconfig.json
error TS2339: Property 'some' does not exist on type 'TransitionsConfigArray<TContext, TEvent> | (TransitionsConfigMap<TContext, TEvent> extends any ? Extract<...> : never)'.error TS2322: Type 'TransitionsConfigArray<TContext, TEvent> | (TransitionsConfigMap<TContext, TEvent> extends any ? Extract<...> : never)' is not assignable to type '(TransitionConfig<TContext, EventObject> & { event: string; })[]'.
packages/xstate-test/tsconfig.json
error TS2339: Property 'some' does not exist on type 'TransitionsConfigArray<TContext, TEvent> | (TransitionsConfigMap<TContext, TEvent> extends any ? Extract<...> : never)'.error TS2322: Type 'TransitionsConfigArray<TContext, TEvent> | (TransitionsConfigMap<TContext, TEvent> extends any ? Extract<...> : never)' is not assignable to type '(TransitionConfig<TContext, EventObject> & { event: string; })[]'.
vercel/hyper
2 of 3 projects failed to build with the old tsc and were ignored
tsconfig.json
error TS2339: Property 'reduce' does not exist on type 'T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never'.
vuejs/vue
7 of 8 projects failed to build with the old tsc and were ignored
tsconfig.json
error TS2339: Property 'indexOf' does not exist on type 'T[] | (T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never)'.
withfig/autocomplete
tsconfig.json
error TS2339: Property 'at' does not exist on type 'T[] | (T extends any ? Extract<true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike<infer U> | Iterable<...> ? U[] : unknown[], T> : never)'.
That's bad; it seems that the checker really hate T extends readonly any[] ? T that line.
It seems that I can't use the TypeScript bot, @sandersn please help me run the test suite again.
@typescript-bot run dt @typescript-bot test top100 @typescript-bot user test this @typescript-bot perf test this faster
Heya @sandersn, I've started to run the parallelized Definitely Typed test suite on this PR at 2149ae66f45674283cfecf94da97525d5c2fa22d. You can monitor the build here.
Heya @sandersn, I've started to run the diff-based top-repos suite on this PR at 2149ae66f45674283cfecf94da97525d5c2fa22d. You can monitor the build here.
Update: The results are in!
Heya @sandersn, I've started to run the diff-based user code test suite on this PR at 2149ae66f45674283cfecf94da97525d5c2fa22d. You can monitor the build here.
Update: The results are in!
Heya @sandersn, I've started to run the abridged perf test suite on this PR at 2149ae66f45674283cfecf94da97525d5c2fa22d. You can monitor the build here.
Update: The results are in!
@sandersn Here are the results of running the user test suite comparing main and refs/pull/50454/merge:
Something interesting changed - please have a look.
Details
webpack
tsconfig.json
- [NEW]
error TS2322: Type '{ fileDependencies: string[] | (RuntimeValueOptions & unknown[]); }' is not assignable to type 'true | string[] | RuntimeValueOptions'. - [NEW]
error TS2339: Property 'fileDependencies' does not exist on type 'string[] | RuntimeValueOptions'. - [NEW]
error TS2339: Property 'contextDependencies' does not exist on type 'string[] | RuntimeValueOptions'. - [NEW]
error TS2339: Property 'missingDependencies' does not exist on type 'string[] | RuntimeValueOptions'. - [NEW]
error TS2339: Property 'buildDependencies' does not exist on type 'string[] | RuntimeValueOptions'. - [NEW]
error TS2339: Property 'version' does not exist on type 'string[] | RuntimeValueOptions'. - [NEW]
error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string'. - [NEW]
error TS2339: Property 'indexOf' does not exist on type 'unknown'. - [NEW]
error TS2339: Property 'slice' does not exist on type 'unknown'. - [NEW]
error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'Externals'. - [NEW]
error TS2339: Property 'hooks' does not exist on type 'unknown'. - [NEW]
error TS2339: Property 'outputPath' does not exist on type 'unknown'. - [NEW]
error TS2339: Property 'inputFileSystem' does not exist on type 'unknown'. - [NEW]
error TS2339: Property 'outputFileSystem' does not exist on type 'unknown'. - [NEW]
error TS2339: Property 'watchFileSystem' does not exist on type 'unknown'. - [NEW]
error TS2339: Property 'intermediateFileSystem' does not exist on type 'unknown'. - [NEW]
error TS2339: Property 'getInfrastructureLogger' does not exist on type 'unknown'. - [NEW]
error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'Compiler'. - [NEW]
error TS2339: Property 'name' does not exist on type 'unknown'. - [NEW]
error TS2322: Type 'unknown' is not assignable to type 'Compiler'. - [NEW]
error TS2322: Type '{ compiler: any; setupResult: any; result: any; state: string; children: any[]; parents: any[]; }[]' is not assignable to type 'Node[]'. - [NEW]
error TS2339: Property 'close' does not exist on type 'unknown'. - [NEW]
error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'Compiler | MultiCompiler'. - [NEW]
error TS2322: Type 'string[] | (EntryObject & unknown[])' is not assignable to type 'string[]'. - [NEW]
error TS2322: Type 'unknown' is not assignable to type 'string'. - [NEW]
error TS2322: Type 'string | string[] | (LibraryCustomUmdObject & unknown[])' is not assignable to type 'string | string[]'. - [NEW]
error TS2322: Type 'LibraryName' is not assignable to type 'string | string[]'. - [NEW]
error TS2345: Argument of type 'unknown[]' is not assignable to parameter of type 'string[]'. - [NEW]
error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'object'.
tsconfig.types.json
- [NEW]
error TS2322: Type '{ fileDependencies: string[] | (RuntimeValueOptions & unknown[]); }' is not assignable to type 'true | string[] | RuntimeValueOptions | undefined'. - [NEW]
error TS2339: Property 'fileDependencies' does not exist on type 'string[] | RuntimeValueOptions'. - [NEW]
error TS2339: Property 'contextDependencies' does not exist on type 'string[] | RuntimeValueOptions'. - [NEW]
error TS2339: Property 'missingDependencies' does not exist on type 'string[] | RuntimeValueOptions'. - [NEW]
error TS2339: Property 'buildDependencies' does not exist on type 'string[] | RuntimeValueOptions'. - [NEW]
error TS2339: Property 'version' does not exist on type 'string[] | RuntimeValueOptions'. - [NEW]
error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string'. - [NEW]
error TS18046: 'firstItem' is of type 'unknown'. - [NEW]
error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'Externals'. - [NEW]
error TS18046: 'c' is of type 'unknown'. - [NEW]
error TS18046: 'compiler' is of type 'unknown'. - [NEW]
error TS7006: Parameter 'stats' implicitly has an 'any' type. - [NEW]
error TS2571: Object is of type 'unknown'. - [NEW]
error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'Compiler'. - [NEW]
error TS2322: Type 'unknown' is not assignable to type 'Compiler'. - [NEW]
error TS2740: Type '{}' is missing the following properties from type 'Compiler': hooks, webpack, name, parentCompilation, and 56 more. - [NEW]
error TS2322: Type '{ compiler: unknown; setupResult: undefined; result: undefined; state: "blocked"; children: never[]; parents: never[]; }[]' is not assignable to type 'Node[]'. - [NEW]
error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'WatchOptions'. - [NEW]
error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'Compiler | MultiCompiler'. - [NEW]
error TS7053: Element implicitly has an 'any' type because expression of type 'number' can't be used to index type '(T[P] & null extends any ? Extract<(T[P] & null extends string | readonly any[] ? unknown : T[P] & null extends ArrayLike<infer U> | Iterable<infer U> ? U : unknown)[], T[P] & null> | Extract<...> : never) | (T[P] & {} extends any ? Extract<...> | Extract<...> : never)'. - [NEW]
error TS2322: Type 'string[] | (EntryObject & unknown[])' is not assignable to type 'string[] | undefined'. - [NEW]
error TS2322: Type 'string | string[] | (LibraryCustomUmdObject & unknown[]) | undefined' is not assignable to type 'LibraryName'. - [NEW]
error TS2322: Type 'unknown' is not assignable to type 'string | undefined'. - [NEW]
error TS2322: Type 'string | string[] | (LibraryCustomUmdObject & unknown[]) | undefined' is not assignable to type 'string | string[] | undefined'. - [NEW]
error TS2345: Argument of type 'unknown[]' is not assignable to parameter of type 'string[]'. - [NEW]
error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'object'. - [NEW]
error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'OptimizationSplitChunksCacheGroup'. - [NEW]
error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'Object'. - [NEW]
error TS2345: Argument of type '(readonly WebpackOptions[] & MultiCompilerOptions) | (WebpackOptions & unknown[])' is not assignable to parameter of type 'readonly WebpackOptions[]'. - [NEW]
error TS18046: 'options' is of type 'unknown'. - [MISSING]
error TS2322: Type '{ compiler: Compiler; setupResult: undefined; result: undefined; state: "blocked"; children: never[]; parents: never[]; }[]' is not assignable to type 'Node[]'. - [MISSING]
error TS2322: Type 'string | string[] | undefined' is not assignable to type 'LibraryName'. - [MISSING]
error TS2322: Type 'string | LibraryCustomUmdObject' is not assignable to type 'string | undefined'. - [MISSING]
error TS2345: Argument of type '{ _index: number; type: string; constructor?: Function | undefined; toString?: (() => string) | undefined; toLocaleString?: (() => string) | undefined; valueOf?: (() => Object) | undefined; hasOwnProperty?: ((v: PropertyKey) => boolean) | undefined; isPrototypeOf?: ((v: Object) => boolean) | undefined; propertyIsEnu...' is not assignable to parameter of type 'Object'.
@sandersn The results of the perf run you requested are in!
Here they are:
Comparison Report - main..50454
| Metric | main | 50454 | Delta | Best | Worst |
|---|---|---|---|---|---|
| Angular - node (v16.17.1, x64) | |||||
| Memory used | 352,334k (± 0.02%) | 352,630k (± 0.02%) | +296k (+ 0.08%) | 352,386k | 352,736k |
| Parse Time | 1.89s (± 0.46%) | 1.90s (± 1.08%) | +0.00s (+ 0.16%) | 1.86s | 1.96s |
| Bind Time | 0.74s (± 0.78%) | 0.75s (± 0.66%) | +0.00s (+ 0.40%) | 0.74s | 0.76s |
| Check Time | 5.69s (± 0.73%) | 5.65s (± 0.33%) | -0.04s (- 0.70%) | 5.62s | 5.69s |
| Emit Time | 6.08s (± 0.66%) | 6.08s (± 0.67%) | -0.00s (- 0.08%) | 5.97s | 6.19s |
| Total Time | 14.41s (± 0.57%) | 14.37s (± 0.38%) | -0.04s (- 0.31%) | 14.20s | 14.48s |
| Compiler-Unions - node (v16.17.1, x64) | |||||
| Memory used | 198,279k (± 0.57%) | 198,700k (± 0.61%) | +421k (+ 0.21%) | 197,286k | 200,796k |
| Parse Time | 0.79s (± 0.87%) | 0.78s (± 0.71%) | -0.00s (- 0.38%) | 0.77s | 0.80s |
| Bind Time | 0.45s (± 1.09%) | 0.45s (± 0.89%) | -0.00s (- 0.66%) | 0.44s | 0.46s |
| Check Time | 6.50s (± 0.50%) | 6.51s (± 0.38%) | +0.00s (+ 0.06%) | 6.46s | 6.57s |
| Emit Time | 2.31s (± 1.09%) | 2.30s (± 0.71%) | -0.01s (- 0.43%) | 2.26s | 2.34s |
| Total Time | 10.05s (± 0.50%) | 10.04s (± 0.35%) | -0.01s (- 0.10%) | 9.95s | 10.12s |
| Monaco - node (v16.17.1, x64) | |||||
| Memory used | 331,133k (± 0.02%) | 331,125k (± 0.01%) | -8k (- 0.00%) | 331,077k | 331,202k |
| Parse Time | 1.42s (± 0.37%) | 1.43s (± 0.52%) | +0.01s (+ 0.42%) | 1.41s | 1.45s |
| Bind Time | 0.69s (± 0.86%) | 0.69s (± 0.75%) | -0.00s (- 0.43%) | 0.68s | 0.70s |
| Check Time | 5.47s (± 0.55%) | 5.48s (± 0.50%) | +0.01s (+ 0.15%) | 5.44s | 5.54s |
| Emit Time | 3.26s (± 0.55%) | 3.26s (± 0.79%) | +0.00s (+ 0.06%) | 3.23s | 3.32s |
| Total Time | 10.85s (± 0.44%) | 10.86s (± 0.39%) | +0.01s (+ 0.13%) | 10.78s | 10.97s |
| TFS - node (v16.17.1, x64) | |||||
| Memory used | 294,050k (± 0.02%) | 294,087k (± 0.01%) | +37k (+ 0.01%) | 294,031k | 294,129k |
| Parse Time | 1.22s (± 1.53%) | 1.23s (± 1.09%) | +0.01s (+ 0.49%) | 1.20s | 1.26s |
| Bind Time | 0.64s (± 0.97%) | 0.64s (± 0.63%) | 0.00s ( 0.00%) | 0.63s | 0.65s |
| Check Time | 5.12s (± 0.44%) | 5.13s (± 0.55%) | +0.01s (+ 0.18%) | 5.08s | 5.20s |
| Emit Time | 3.47s (± 0.64%) | 3.49s (± 0.71%) | +0.02s (+ 0.49%) | 3.43s | 3.55s |
| Total Time | 10.45s (± 0.42%) | 10.48s (± 0.47%) | +0.03s (+ 0.31%) | 10.34s | 10.56s |
| material-ui - node (v16.17.1, x64) | |||||
| Memory used | 439,350k (± 0.01%) | 439,362k (± 0.01%) | +12k (+ 0.00%) | 439,296k | 439,416k |
| Parse Time | 1.72s (± 1.24%) | 1.73s (± 0.96%) | +0.01s (+ 0.47%) | 1.69s | 1.76s |
| Bind Time | 0.54s (± 0.69%) | 0.54s (± 0.55%) | +0.01s (+ 1.31%) | 0.54s | 0.55s |
| Check Time | 12.52s (± 0.62%) | 12.65s (± 0.75%) | +0.13s (+ 1.00%) | 12.50s | 12.85s |
| Emit Time | 0.00s (± 0.00%) | 0.00s (± 0.00%) | 0.00s ( NaN%) | 0.00s | 0.00s |
| Total Time | 14.78s (± 0.53%) | 14.92s (± 0.63%) | +0.14s (+ 0.94%) | 14.76s | 15.11s |
| xstate - node (v16.17.1, x64) | |||||
| Memory used | 554,310k (± 0.02%) | 555,844k (± 0.02%) | +1,534k (+ 0.28%) | 555,677k | 556,243k |
| Parse Time | 2.31s (± 0.28%) | 2.30s (± 0.36%) | -0.00s (- 0.17%) | 2.29s | 2.32s |
| Bind Time | 0.89s (± 1.49%) | 0.88s (± 1.37%) | -0.01s (- 0.67%) | 0.87s | 0.93s |
| Check Time | 1.43s (± 0.92%) | 1.47s (± 0.69%) | +0.04s (+ 3.01%) | 1.45s | 1.50s |
| Emit Time | 0.07s (± 0.00%) | 0.07s (± 0.00%) | 0.00s ( 0.00%) | 0.07s | 0.07s |
| Total Time | 4.70s (± 0.23%) | 4.74s (± 0.27%) | +0.04s (+ 0.87%) | 4.71s | 4.76s |
| Machine Name | ts-ci-ubuntu |
|---|---|
| Platform | linux 5.4.0-126-generic |
| Architecture | x64 |
| Available Memory | 16 GB |
| Available Memory | 15 GB |
| CPUs | 4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz |
- node (v16.17.1, x64)
- Angular - node (v16.17.1, x64)
- Compiler-Unions - node (v16.17.1, x64)
- Monaco - node (v16.17.1, x64)
- TFS - node (v16.17.1, x64)
- material-ui - node (v16.17.1, x64)
- xstate - node (v16.17.1, x64)
| Benchmark | Name | Iterations |
|---|---|---|
| Current | 50454 | 10 |
| Baseline | main | 10 |
Developer Information:
@sandersn Here are the results of running the top-repos suite comparing main and refs/pull/50454/merge:
Something interesting changed - please have a look.
Details
cheeriojs/cheerio
1 of 2 projects failed to build with the old tsc and were ignored
tsconfig.json
error TS2322: Type 'ChildNode[] | (S extends any ? Extract<(true extends false & S ? any : S extends string | readonly any[] ? unknown : S extends ArrayLike<infer U> | Iterable<...> ? U : unknown)[], S> | Extract<...> : never) | T[] | (NonNullable<...> extends any ? Extract<...> | Extract<...> : never) | undefined' is not assignable to type 'AnyNode[] | undefined'.
conwnet/github1s
2 of 4 projects failed to build with the old tsc and were ignored
extensions/github1s/tsconfig.json
error TS2322: Type 'T[] | (T extends any ? Extract<(true extends false & T ? any : T extends string | readonly any[] ? unknown : T extends ArrayLike<infer U> | Iterable<infer U> ? U : unknown)[], T> | Extract<...> : never)' is not assignable to type 'T[]'.
excalidraw/excalidraw
2 of 5 projects failed to build with the old tsc and were ignored
tsconfig-types.json
error TS2322: Type 'readonly (readonly [number, number])[] | number[][]' is not assignable to type 'readonly (readonly [number, number])[]'.
tsconfig.json
error TS2322: Type 'readonly (readonly [number, number])[] | number[][]' is not assignable to type 'readonly (readonly [number, number])[]'.
microsoft/vscode
3 of 53 projects failed to build with the old tsc and were ignored
build/tsconfig.build.json
error TS18046: 'e' is of type 'unknown'.error TS2322: Type 'IBuiltInExtension[] | ({ include?: IBuiltInExtension[] | undefined; exclude?: string[] | undefined; } & unknown[])' is not assignable to type 'IBuiltInExtension[]'.
extensions/ipynb/tsconfig.json
error TS2345: Argument of type 'unknown[]' is not assignable to parameter of type 'string | string[]'.
extensions/markdown-language-features/tsconfig.browser.json
error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string'.
extensions/markdown-language-features/tsconfig.json
error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string'.
extensions/vscode-colorize-tests/tsconfig.json
error TS18046: 'd' is of type 'unknown'.
src/tsconfig.json
error TS2322: Type 'any[] | unknown[] | (Record<string, any> & unknown[])' is not assignable to type '(HTMLElement | Record<string, HTMLElement>)[] | undefined'.error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string'.error TS18046: 'labelStr' is of type 'unknown'.error TS2322: Type '{ data: { label: unknown; score: FuzzyScore; }; visibility: TreeVisibility.Visible | TreeVisibility.Recurse; }' is not assignable to type 'TreeFilterResult<FuzzyScore | LabelFuzzyScore>'.error TS2769: No overload matches this call.error TS2322: Type 'T[] | (T extends any ? Extract<(true extends false & T ? any : T extends string | readonly any[] ? unknown : T extends ArrayLike<infer U> | Iterable<infer U> ? U : unknown)[], T> | Extract<...> : never)' is not assignable to type 'T[]'.error TS2349: This expression is not callable.error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'LanguageSelector | undefined'.error TS2322: Type 'unknown' is not assignable to type 'FuzzyAction'.error TS2345: Argument of type 'string[] | (IBundledStrings & unknown[])' is not assignable to parameter of type 'string[]'.error TS2345: Argument of type 'IWindowOpenable[] | (IOpenEmptyWindowOptions & unknown[])' is not assignable to parameter of type 'IWindowOpenable[]'.error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'WhenUser'.error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'IConfigurationNode'.error TS2345: Argument of type '(selector: DocumentSelector) => DocumentSelector' is not assignable to parameter of type '((value: string | DocumentFilter, index: number, array: readonly (string | DocumentFilter)[]) => void) & ((value: unknown, index: number, array: unknown[]) => void)'.error TS2345: Argument of type '{ (selector: undefined): undefined; (selector: DocumentSelector): LanguageSelector; (selector: DocumentSelector | undefined): LanguageSelector | undefined; }' is not assignable to parameter of type '((value: string | DocumentFilter, index: number, array: readonly (string | DocumentFilter)[]) => LanguageSelector | undefined) & ((value: unknown, index: number, array: unknown[]) => LanguageSelector | undefined)'.error TS2322: Type 'string[] | (ProcessExecutionOptions & unknown[])' is not assignable to type 'string[]'.error TS2322: Type 'EditorInput[] | (ICloseEditorsFilter & unknown[])' is not assignable to type 'EditorInput[]'.error TS2322: Type 'string[] | ({ [kind: string]: boolean; } & unknown[])' is not assignable to type 'string[]'.error TS2322: Type 'unknown' is not assignable to type 'string | undefined'.error TS2322: Type 'OpenIssueReporterArgs | { extensionId: unknown; }' is not assignable to type 'Partial<IssueReporterData>'.error TS2339: Property 'expression' does not exist on type 'unknown'.error TS2345: Argument of type '{ root: URI; expression: IExpression; }[] | (IExpression & unknown[])' is not assignable to parameter of type '{ root: URI; expression: IExpression; }[]'.error TS2339: Property 'join' does not exist on type 'never'.error TS7006: Parameter 'item' implicitly has an 'any' type.error TS2322: Type 'unknown[]' is not assignable to type 'ITerminalInstance[]'.error TS2345: Argument of type '(data: IDecorationData | IDecorationData[]) => string' is not assignable to parameter of type '((value: IDecorationData, index: number, array: IDecorationData[]) => string) & ((value: unknown, index: number, array: unknown[]) => string)'.error TS2345: Argument of type 'IDecorationData[] | (IDecorationData & unknown[])' is not assignable to parameter of type 'IDecorationData[]'.error TS2322: Type 'unknown[]' is not assignable to type 'string[]'.error TS2322: Type 'unknown[]' is not assignable to type 'string | boolean | ITextMateThemingRule[] | ITokenColorizationSetting | ISemanticTokenRules | undefined'.
src/tsconfig.monaco.json
error TS2322: Type 'any[] | unknown[] | (Record<string, any> & unknown[])' is not assignable to type '(HTMLElement | Record<string, HTMLElement>)[] | undefined'.error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string'.error TS18046: 'labelStr' is of type 'unknown'.error TS2322: Type '{ data: { label: unknown; score: FuzzyScore; }; visibility: TreeVisibility.Visible | TreeVisibility.Recurse; }' is not assignable to type 'TreeFilterResult<FuzzyScore | LabelFuzzyScore>'.error TS2769: No overload matches this call.error TS2322: Type 'T[] | (T extends any ? Extract<(true extends false & T ? any : T extends string | readonly any[] ? unknown : T extends ArrayLike<infer U> | Iterable<infer U> ? U : unknown)[], T> | Extract<...> : never)' is not assignable to type 'T[]'.error TS2349: This expression is not callable.error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'LanguageSelector | undefined'.error TS2322: Type 'unknown' is not assignable to type 'FuzzyAction'.error TS2345: Argument of type 'string[] | (IBundledStrings & unknown[])' is not assignable to parameter of type 'string[]'.
src/tsconfig.tsec.json
error TS2322: Type 'any[] | unknown[] | (Record<string, any> & unknown[])' is not assignable to type '(HTMLElement | Record<string, HTMLElement>)[] | undefined'.error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string'.error TS18046: 'labelStr' is of type 'unknown'.error TS2322: Type '{ data: { label: unknown; score: FuzzyScore; }; visibility: TreeVisibility.Visible | TreeVisibility.Recurse; }' is not assignable to type 'TreeFilterResult<FuzzyScore | LabelFuzzyScore>'.error TS2769: No overload matches this call.error TS2322: Type 'T[] | (T extends any ? Extract<(true extends false & T ? any : T extends string | readonly any[] ? unknown : T extends ArrayLike<infer U> | Iterable<infer U> ? U : unknown)[], T> | Extract<...> : never)' is not assignable to type 'T[]'.error TS2349: This expression is not callable.error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'LanguageSelector | undefined'.error TS2322: Type 'unknown' is not assignable to type 'FuzzyAction'.error TS2345: Argument of type 'string[] | (IBundledStrings & unknown[])' is not assignable to parameter of type 'string[]'.error TS2345: Argument of type 'IWindowOpenable[] | (IOpenEmptyWindowOptions & unknown[])' is not assignable to parameter of type 'IWindowOpenable[]'.error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'WhenUser'.error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'IConfigurationNode'.error TS2345: Argument of type '(selector: DocumentSelector) => DocumentSelector' is not assignable to parameter of type '((value: string | DocumentFilter, index: number, array: readonly (string | DocumentFilter)[]) => void) & ((value: unknown, index: number, array: unknown[]) => void)'.error TS2345: Argument of type '{ (selector: undefined): undefined; (selector: DocumentSelector): LanguageSelector; (selector: DocumentSelector | undefined): LanguageSelector | undefined; }' is not assignable to parameter of type '((value: string | DocumentFilter, index: number, array: readonly (string | DocumentFilter)[]) => LanguageSelector | undefined) & ((value: unknown, index: number, array: unknown[]) => LanguageSelector | undefined)'.error TS2322: Type 'string[] | (ProcessExecutionOptions & unknown[])' is not assignable to type 'string[]'.error TS2322: Type 'EditorInput[] | (ICloseEditorsFilter & unknown[])' is not assignable to type 'EditorInput[]'.error TS2322: Type 'string[] | ({ [kind: string]: boolean; } & unknown[])' is not assignable to type 'string[]'.error TS2322: Type 'unknown' is not assignable to type 'string | undefined'.error TS2322: Type 'OpenIssueReporterArgs | { extensionId: unknown; }' is not assignable to type 'Partial<IssueReporterData>'.error TS2339: Property 'expression' does not exist on type 'unknown'.error TS2345: Argument of type '{ root: URI; expression: IExpression; }[] | (IExpression & unknown[])' is not assignable to parameter of type '{ root: URI; expression: IExpression; }[]'.error TS2339: Property 'join' does not exist on type 'never'.error TS7006: Parameter 'item' implicitly has an 'any' type.error TS2322: Type 'unknown[]' is not assignable to type 'ITerminalInstance[]'.error TS2345: Argument of type '(data: IDecorationData | IDecorationData[]) => string' is not assignable to parameter of type '((value: IDecorationData, index: number, array: IDecorationData[]) => string) & ((value: unknown, index: number, array: unknown[]) => string)'.error TS2345: Argument of type 'IDecorationData[] | (IDecorationData & unknown[])' is not assignable to parameter of type 'IDecorationData[]'.error TS2322: Type 'unknown[]' is not assignable to type 'string[]'.error TS2322: Type 'unknown[]' is not assignable to type 'string | boolean | ITextMateThemingRule[] | ITokenColorizationSetting | ISemanticTokenRules | undefined'.
mobxjs/mobx
7 of 9 projects failed to build with the old tsc and were ignored
packages/mobx/tsconfig.json
error TS2322: Type 'this' is not assignable to type 'void'.
n8n-io/n8n
6 of 9 projects failed to build with the old tsc and were ignored
packages/workflow/tsconfig.json
error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'NodeParameterValueType'.error TS2339: Property 'length' does not exist on type 'never'.
neoclide/coc.nvim
tsconfig.json
error TS2322: Type 'T[] | (T extends any ? Extract<(true extends false & T ? any : T extends string | readonly any[] ? unknown : T extends ArrayLike<infer U> | Iterable<infer U> ? U : unknown)[], T> | Extract<...> : never)' is not assignable to type 'T[]'.
palantir/blueprint
4 of 27 projects failed to build with the old tsc and were ignored
packages/select/src/tsconfig.json
error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'T'.error TS2345: Argument of type 'unknown[]' is not assignable to parameter of type 'T[]'.
packages/select/test/tsconfig.json
error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'T'.error TS2345: Argument of type 'unknown[]' is not assignable to parameter of type 'T[]'.
pubkey/rxdb
6 of 10 projects failed to build with the old tsc and were ignored
config/tsconfig.types.json
error TS2322: Type 'string | undefined' is not assignable to type 'string'.error TS2345: Argument of type 'readonly string[]' is not assignable to parameter of type 'string[]'.
tsconfig.json
error TS2322: Type 'string | undefined' is not assignable to type 'string'.error TS2345: Argument of type 'readonly string[]' is not assignable to parameter of type 'string[]'.
react-hook-form/react-hook-form
2 of 3 projects failed to build with the old tsc and were ignored
tsconfig.json
error TS2339: Property 'startsWith' does not exist on type 'string | string[]'.error TS2345: Argument of type 'string | string[]' is not assignable to parameter of type 'string'.error TS2345: Argument of type '(Partial<FieldArray<TFieldValues, TFieldArrayName>>[] | (Partial<FieldArray<TFieldValues, TFieldArrayName>> extends any ? Extract<...> | Extract<...> : never) | Extract<...> | (Partial<...> | Partial<...>[])[])[number][]' is not assignable to parameter of type 'Partial<FieldArrayWithId<TFieldValues, TFieldArrayName, TKeyName>>[]'.error TS2345: Argument of type '(Partial<FieldArray<TFieldValues, TFieldArrayName>>[] | (Partial<FieldArray<TFieldValues, TFieldArrayName>> extends any ? Extract<...> | Extract<...> : never) | Extract<...> | (Partial<...> | Partial<...>[])[])[number][]' is not assignable to parameter of type 'SetStateAction<Partial<unknown>[]>'.error TS2345: Argument of type '(Partial<FieldArray<TFieldValues, TFieldArrayName>>[] | (Partial<FieldArray<TFieldValues, TFieldArrayName>> extends any ? Extract<...> | Extract<...> : never) | Extract<...> | (Partial<...> | Partial<...>[])[])[number][]' is not assignable to parameter of type 'Partial<unknown>[]'.error TS2322: Type '(T | (T[] | (T extends any ? Extract<(true extends false & T ? any : T extends string | readonly any[] ? unknown : T extends ArrayLike<infer U> | Iterable<...> ? U : unknown)[], T> | Extract<...> : never) | Extract<...> | (T | T[])[])[number])[]' is not assignable to type 'T[]'.error TS2322: Type '(T | (T[] | (T extends any ? Extract<(true extends false & T ? any : T extends string | readonly any[] ? unknown : T extends ArrayLike<infer U> | Iterable<...> ? U : unknown)[], T> | Extract<...> : never) | Extract<...> | (T | ... 1 more ... | undefined)[])[number])[]' is not assignable to type '(T | undefined)[]'.error TS2322: Type '((T[] | (T extends any ? Extract<(true extends false & T ? any : T extends string | readonly any[] ? unknown : T extends ArrayLike<infer U> | Iterable<infer U> ? U : unknown)[], T> | Extract<...> : never) | Extract<...> | (T | T[])[])[number] | (T[] | ... 1 more ... | T[][])[number])[]' is not assignable to type 'T[]'.
ReactiveX/rxjs
8 of 13 projects failed to build with the old tsc and were ignored
src/tsconfig.cjs.spec.json
error TS2322: Type 'T[] | (T extends any ? Extract<(true extends false & T ? any : T extends string | readonly any[] ? unknown : T extends ArrayLike<infer U> | Iterable<infer U> ? U : unknown)[], T> | Extract<...> : never) | (O extends any ? Extract<...> | Extract<...> : never) | Extract<...>' is not assignable to type 'T[]'.error TS2322: Type 'T[] | (T extends any ? Extract<(true extends false & T ? any : T extends string | readonly any[] ? unknown : T extends ArrayLike<infer U> | Iterable<infer U> ? U : unknown)[], T> | Extract<...> : never)' is not assignable to type 'T[]'.
src/tsconfig.esm5.rollup.json
error TS2322: Type 'T[] | (T extends any ? Extract<(true extends false & T ? any : T extends string | readonly any[] ? unknown : T extends ArrayLike<infer U> | Iterable<infer U> ? U : unknown)[], T> | Extract<...> : never) | (O extends any ? Extract<...> | Extract<...> : never) | Extract<...>' is not assignable to type 'T[]'.error TS2322: Type 'T[] | (T extends any ? Extract<(true extends false & T ? any : T extends string | readonly any[] ? unknown : T extends ArrayLike<infer U> | Iterable<infer U> ? U : unknown)[], T> | Extract<...> : never)' is not assignable to type 'T[]'.
src/tsconfig.types.json
error TS2322: Type 'T[] | (T extends any ? Extract<(true extends false & T ? any : T extends string | readonly any[] ? unknown : T extends ArrayLike<infer U> | Iterable<infer U> ? U : unknown)[], T> | Extract<...> : never) | (O extends any ? Extract<...> | Extract<...> : never) | Extract<...>' is not assignable to type 'T[]'.error TS2322: Type 'T[] | (T extends any ? Extract<(true extends false & T ? any : T extends string | readonly any[] ? unknown : T extends ArrayLike<infer U> | Iterable<infer U> ? U : unknown)[], T> | Extract<...> : never)' is not assignable to type 'T[]'.
statelyai/xstate
6 of 20 projects failed to build with the old tsc and were ignored
packages/xstate-inspect/tsconfig.json
error TS2322: Type 'TransitionsConfigArray<TContext, TEvent> | (TransitionsConfigMap<TContext, TEvent> extends any ? Extract<...> | Extract<...> : never) | Extract<...>' is not assignable to type '(TransitionConfig<TContext, EventObject> & { event: string; })[]'.
packages/xstate-test/tsconfig.json
error TS2322: Type 'TransitionsConfigArray<TContext, TEvent> | (TransitionsConfigMap<TContext, TEvent> extends any ? Extract<...> | Extract<...> : never) | Extract<...>' is not assignable to type '(TransitionConfig<TContext, EventObject> & { event: string; })[]'.
styled-components/styled-components
1 of 2 projects failed to build with the old tsc and were ignored
packages/styled-components/tsconfig.json
error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'Interpolation<Props>'.error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'Interpolation<ExecutionContext & Props>'.
typeorm/typeorm
tsconfig.json
error TS18046: 'options' is of type 'unknown'.error TS2322: Type '_QueryDeepPartialEntity<ObjectLiteral extends Entity ? unknown : Entity>[] | (_QueryDeepPartialEntity<ObjectLiteral extends Entity ? unknown : Entity> extends any ? Extract<...> | Extract<...> : never) | Extract<...>' is not assignable to type '_QueryDeepPartialEntity<ObjectLiteral extends Entity ? unknown : Entity>[]'.error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'Object'.error TS2345: Argument of type '_QueryDeepPartialEntity<ObjectLiteral extends Entity ? unknown : Entity>[] | (_QueryDeepPartialEntity<ObjectLiteral extends Entity ? unknown : Entity> extends any ? Extract<...> | Extract<...> : never) | Extract<...>' is not assignable to parameter of type 'ObjectLiteral[]'.error TS7053: Element implicitly has an 'any' type because expression of type 'string | number | symbol' can't be used to index type 'string | number | symbol'.error TS18046: 'joinColumnOption' is of type 'unknown'.error TS2339: Property 'indexOf' does not exist on type 'never'.error TS2322: Type 'unknown[]' is not assignable to type '(string | number)[]'.error TS18046: 'v' is of type 'unknown'.error TS2322: Type 'unknown[]' is not assignable to type 'ObjectLiteral[]'.error TS2322: Type 'string[] | ({ columns?: string[] | undefined; overwrite?: string[] | undefined; conflict_target?: string | string[] | undefined; } & unknown[])' is not assignable to type 'string[] | undefined'.error TS2322: Type 'unknown[] | ObjectLiteral[] | (ObjectLiteral & unknown[])' is not assignable to type 'ObjectLiteral[]'.error TS2345: Argument of type 'unknown[]' is not assignable to parameter of type 'ObjectLiteral[]'.error TS2322: Type 'E1[] | (E1 extends any ? Extract<(true extends false & E1 ? any : E1 extends string | readonly any[] ? unknown : E1 extends ArrayLike<infer U> | Iterable<...> ? U : unknown)[], E1> | Extract<...> : never)' is not assignable to type 'E1[]'.error TS2322: Type 'E2[] | (E2 extends any ? Extract<(true extends false & E2 ? any : E2 extends string | readonly any[] ? unknown : E2 extends ArrayLike<infer U> | Iterable<...> ? U : unknown)[], E2> | Extract<...> : never)' is not assignable to type 'E2[]'.error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'ObjectLiteral'.error TS2345: Argument of type 'FindOptionsRelationByString | (FindOptionsRelations<any> & unknown[])' is not assignable to parameter of type 'string[]'.error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'FindOptionsWhere<any>'.error TS2322: Type 'Entity[] | (Entity extends any ? Extract<(true extends false & Entity ? any : Entity extends string | readonly any[] ? unknown : Entity extends ArrayLike<...> | Iterable<...> ? U : unknown)[], Entity> | Extract<...> : never)' is not assignable to type 'Entity[]'.
vercel/hyper
2 of 3 projects failed to build with the old tsc and were ignored
tsconfig.json
error TS2349: This expression is not callable.
Heck no. It seems that without making it looser it won’t be a solution.
I've just tinkered with it a bit. @sandersn Could you please give it another try?
@typescript-bot run dt @typescript-bot test top100 @typescript-bot user test this @typescript-bot perf test this faster
Heya @sandersn, I've started to run the diff-based user code test suite on this PR at dc97890ba1a2d26b32ca436be70160c83d94587b. You can monitor the build here.
Update: The results are in!
Heya @sandersn, I've started to run the abridged perf test suite on this PR at dc97890ba1a2d26b32ca436be70160c83d94587b. You can monitor the build here.
Update: The results are in!
Heya @sandersn, I've started to run the diff-based top-repos suite on this PR at dc97890ba1a2d26b32ca436be70160c83d94587b. You can monitor the build here.
Update: The results are in!
Heya @sandersn, I've started to run the parallelized Definitely Typed test suite on this PR at dc97890ba1a2d26b32ca436be70160c83d94587b. You can monitor the build here.
@sandersn Here are the results of running the user test suite comparing main and refs/pull/50454/merge:
Something interesting changed - please have a look.
Details
webpack
tsconfig.json
- [NEW]
error TS2322: Type '{ compiler: any; setupResult: any; result: any; state: string; children: any[]; parents: any[]; }[]' is not assignable to type 'Node[]'.
tsconfig.types.json
- [NEW]
error TS7006: Parameter 'stats' implicitly has an 'any' type. - [NEW]
error TS2322: Type '{ compiler: any; setupResult: undefined; result: undefined; state: "blocked"; children: never[]; parents: never[]; }[]' is not assignable to type 'Node[]'. - [NEW]
error TS7053: Element implicitly has an 'any' type because expression of type 'number' can't be used to index type '(T[P] & null extends any ? (T[P] & null extends string | readonly any[] ? never : T[P] & null extends ArrayLike<infer U> | Iterable<infer U> ? Extract<...> : never) | ({} extends Required<...> ? never : Extract<...>) : never) | (T[P] & {} extends any ? (true extends false & T[P] ? Extract<...> : T[P] & {} extends st...'. - [MISSING]
error TS2322: Type '{ compiler: Compiler; setupResult: undefined; result: undefined; state: "blocked"; children: never[]; parents: never[]; }[]' is not assignable to type 'Node[]'.
@sandersn The results of the perf run you requested are in!
Here they are:
Comparison Report - main..50454
| Metric | main | 50454 | Delta | Best | Worst |
|---|---|---|---|---|---|
| Angular - node (v16.17.1, x64) | |||||
| Memory used | 352,473k (± 0.02%) | 353,198k (± 0.01%) | +726k (+ 0.21%) | 353,151k | 353,247k |
| Parse Time | 1.90s (± 0.66%) | 1.91s (± 1.03%) | +0.01s (+ 0.58%) | 1.87s | 1.95s |
| Bind Time | 0.75s (± 0.91%) | 0.75s (± 0.66%) | -0.00s (- 0.00%) | 0.74s | 0.76s |
| Check Time | 5.71s (± 0.60%) | 5.71s (± 0.61%) | -0.00s (- 0.02%) | 5.64s | 5.77s |
| Emit Time | 6.16s (± 0.94%) | 6.13s (± 0.61%) | -0.04s (- 0.57%) | 6.06s | 6.23s |
| Total Time | 14.51s (± 0.48%) | 14.49s (± 0.44%) | -0.03s (- 0.19%) | 14.37s | 14.70s |
| Compiler-Unions - node (v16.17.1, x64) | |||||
| Memory used | 197,773k (± 0.38%) | 198,113k (± 0.50%) | +340k (+ 0.17%) | 197,406k | 200,787k |
| Parse Time | 0.79s (± 0.76%) | 0.79s (± 0.74%) | +0.00s (+ 0.25%) | 0.78s | 0.80s |
| Bind Time | 0.46s (± 1.04%) | 0.46s (± 0.82%) | -0.00s (- 0.44%) | 0.45s | 0.46s |
| Check Time | 6.48s (± 0.59%) | 6.47s (± 0.48%) | -0.01s (- 0.17%) | 6.41s | 6.56s |
| Emit Time | 2.28s (± 0.90%) | 2.31s (± 1.32%) | +0.03s (+ 1.40%) | 2.28s | 2.42s |
| Total Time | 10.01s (± 0.53%) | 10.03s (± 0.42%) | +0.02s (+ 0.20%) | 9.92s | 10.11s |
| Monaco - node (v16.17.1, x64) | |||||
| Memory used | 331,123k (± 0.01%) | 331,137k (± 0.01%) | +13k (+ 0.00%) | 331,078k | 331,212k |
| Parse Time | 1.44s (± 0.84%) | 1.44s (± 0.74%) | +0.00s (+ 0.07%) | 1.41s | 1.46s |
| Bind Time | 0.70s (± 0.86%) | 0.69s (± 0.71%) | -0.00s (- 0.14%) | 0.69s | 0.71s |
| Check Time | 5.47s (± 0.86%) | 5.47s (± 0.44%) | -0.01s (- 0.13%) | 5.42s | 5.54s |
| Emit Time | 3.25s (± 0.60%) | 3.25s (± 0.45%) | +0.01s (+ 0.28%) | 3.21s | 3.29s |
| Total Time | 10.85s (± 0.64%) | 10.85s (± 0.26%) | -0.00s (- 0.00%) | 10.78s | 10.91s |
| TFS - node (v16.17.1, x64) | |||||
| Memory used | 294,076k (± 0.02%) | 294,022k (± 0.02%) | -54k (- 0.02%) | 293,860k | 294,120k |
| Parse Time | 1.23s (± 2.00%) | 1.23s (± 1.27%) | -0.00s (- 0.24%) | 1.18s | 1.26s |
| Bind Time | 0.64s (± 0.35%) | 0.65s (± 0.73%) | +0.01s (+ 0.94%) | 0.64s | 0.66s |
| Check Time | 5.13s (± 0.58%) | 5.12s (± 0.40%) | -0.01s (- 0.20%) | 5.09s | 5.18s |
| Emit Time | 3.49s (± 0.85%) | 3.48s (± 0.58%) | -0.01s (- 0.17%) | 3.44s | 3.53s |
| Total Time | 10.48s (± 0.48%) | 10.47s (± 0.41%) | -0.01s (- 0.10%) | 10.40s | 10.56s |
| material-ui - node (v16.17.1, x64) | |||||
| Memory used | 438,355k (± 0.01%) | 438,383k (± 0.01%) | +28k (+ 0.01%) | 438,327k | 438,436k |
| Parse Time | 1.73s (± 1.38%) | 1.75s (± 1.37%) | +0.01s (+ 0.75%) | 1.69s | 1.79s |
| Bind Time | 0.54s (± 0.55%) | 0.55s (± 0.87%) | +0.00s (+ 0.92%) | 0.54s | 0.56s |
| Check Time | 12.54s (± 1.09%) | 12.52s (± 0.33%) | -0.02s (- 0.15%) | 12.39s | 12.61s |
| Emit Time | 0.00s (± 0.00%) | 0.00s (± 0.00%) | 0.00s ( NaN%) | 0.00s | 0.00s |
| Total Time | 14.82s (± 1.07%) | 14.81s (± 0.30%) | -0.00s (- 0.01%) | 14.69s | 14.94s |
| xstate - node (v16.17.1, x64) | |||||
| Memory used | 554,419k (± 0.02%) | 555,329k (± 0.01%) | +911k (+ 0.16%) | 555,151k | 555,547k |
| Parse Time | 2.31s (± 0.49%) | 2.32s (± 0.28%) | +0.01s (+ 0.39%) | 2.30s | 2.33s |
| Bind Time | 0.90s (± 2.16%) | 0.90s (± 2.41%) | -0.00s (- 0.22%) | 0.87s | 0.96s |
| Check Time | 1.42s (± 0.86%) | 1.47s (± 1.06%) | +0.05s (+ 3.38%) | 1.42s | 1.50s |
| Emit Time | 0.07s (± 0.00%) | 0.07s (± 0.00%) | 0.00s ( 0.00%) | 0.07s | 0.07s |
| Total Time | 4.70s (± 0.31%) | 4.75s (± 0.36%) | +0.05s (+ 1.11%) | 4.71s | 4.79s |
| Machine Name | ts-ci-ubuntu |
|---|---|
| Platform | linux 5.4.0-126-generic |
| Architecture | x64 |
| Available Memory | 16 GB |
| Available Memory | 15 GB |
| CPUs | 4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz |
- node (v16.17.1, x64)
- Angular - node (v16.17.1, x64)
- Compiler-Unions - node (v16.17.1, x64)
- Monaco - node (v16.17.1, x64)
- TFS - node (v16.17.1, x64)
- material-ui - node (v16.17.1, x64)
- xstate - node (v16.17.1, x64)
| Benchmark | Name | Iterations |
|---|---|---|
| Current | 50454 | 10 |
| Baseline | main | 10 |
Developer Information:
@sandersn Here are the results of running the top-repos suite comparing main and refs/pull/50454/merge:
Something interesting changed - please have a look.
Details
cheeriojs/cheerio
1 of 2 projects failed to build with the old tsc and were ignored
tsconfig.json
error TS2322: Type 'ChildNode[] | (S extends any ? (true extends false & S ? Extract<any[], S> : S extends string | readonly any[] ? never : S extends ArrayLike<...> | Iterable<...> ? Extract<...> : never) | (true extends false & S ? never : {} extends Required<...> ? S & any[] : Extract<...>) : never) | T[] | (NonNullable<...> extends...' is not assignable to type 'AnyNode[] | undefined'.
conwnet/github1s
2 of 4 projects failed to build with the old tsc and were ignored
extensions/github1s/tsconfig.json
error TS2322: Type 'T[] | (T extends any ? (true extends false & T ? Extract<any[], T> : T extends string | readonly any[] ? never : T extends ArrayLike<infer U> | Iterable<...> ? Extract<...> : never) | (true extends false & T ? never : {} extends Required<...> ? T & any[] : Extract<...>) : never)' is not assignable to type 'T[]'.
excalidraw/excalidraw
2 of 5 projects failed to build with the old tsc and were ignored
tsconfig-types.json
error TS2322: Type 'readonly (readonly [number, number])[] | number[][]' is not assignable to type 'readonly (readonly [number, number])[]'.
tsconfig.json
error TS2322: Type 'readonly (readonly [number, number])[] | number[][]' is not assignable to type 'readonly (readonly [number, number])[]'.
microsoft/vscode
4 of 53 projects failed to build with the old tsc and were ignored
src/tsconfig.monaco.json
error TS2345: Argument of type '(_: T) => U' is not assignable to parameter of type '((value: any, index: number, array: any[]) => U) & ((value: unknown, index: number, array: unknown[]) => U) & ((value: any, index: number, array: readonly any[]) => U) & ((value: T, index: number, array: T[]) => U)'.error TS2322: Type 'T[] | (T extends any ? (true extends false & T ? Extract<any[], T> : T extends string | readonly any[] ? never : T extends ArrayLike<infer U> | Iterable<...> ? Extract<...> : never) | (true extends false & T ? never : {} extends Required<...> ? T & any[] : Extract<...>) : never)' is not assignable to type 'T[]'.
src/tsconfig.tsec.json
error TS2345: Argument of type '(_: T) => U' is not assignable to parameter of type '((value: any, index: number, array: any[]) => U) & ((value: unknown, index: number, array: unknown[]) => U) & ((value: any, index: number, array: readonly any[]) => U) & ((value: T, index: number, array: T[]) => U)'.error TS2322: Type 'T[] | (T extends any ? (true extends false & T ? Extract<any[], T> : T extends string | readonly any[] ? never : T extends ArrayLike<infer U> | Iterable<...> ? Extract<...> : never) | (true extends false & T ? never : {} extends Required<...> ? T & any[] : Extract<...>) : never)' is not assignable to type 'T[]'.error TS2339: Property 'join' does not exist on type 'never'.
n8n-io/n8n
6 of 9 projects failed to build with the old tsc and were ignored
packages/workflow/tsconfig.json
error TS2339: Property 'length' does not exist on type 'never'.
neoclide/coc.nvim
tsconfig.json
error TS2322: Type 'T[] | (T extends any ? (true extends false & T ? Extract<any[], T> : T extends string | readonly any[] ? never : T extends ArrayLike<infer U> | Iterable<...> ? Extract<...> : never) | (true extends false & T ? never : {} extends Required<...> ? T & any[] : Extract<...>) : never)' is not assignable to type 'T[]'.
react-hook-form/react-hook-form
2 of 3 projects failed to build with the old tsc and were ignored
tsconfig.json
error TS2339: Property 'startsWith' does not exist on type 'string | string[]'.error TS2345: Argument of type 'string | string[]' is not assignable to parameter of type 'string'.error TS2345: Argument of type '(Partial<FieldArray<TFieldValues, TFieldArrayName>>[] | (Partial<FieldArray<TFieldValues, TFieldArrayName>> extends any ? (true extends false & Partial<...> ? Extract<...> : Partial<...> extends string | readonly any[] ? never : Partial<...> extends ArrayLike<...> | Iterable<...> ? Extract<...> : never) | (true exte...' is not assignable to parameter of type 'Partial<FieldArrayWithId<TFieldValues, TFieldArrayName, TKeyName>>[]'.error TS2345: Argument of type '(Partial<FieldArray<TFieldValues, TFieldArrayName>>[] | (Partial<FieldArray<TFieldValues, TFieldArrayName>> extends any ? (true extends false & Partial<...> ? Extract<...> : Partial<...> extends string | readonly any[] ? never : Partial<...> extends ArrayLike<...> | Iterable<...> ? Extract<...> : never) | (true exte...' is not assignable to parameter of type 'SetStateAction<Partial<unknown>[]>'.error TS2345: Argument of type '(Partial<FieldArray<TFieldValues, TFieldArrayName>>[] | (Partial<FieldArray<TFieldValues, TFieldArrayName>> extends any ? (true extends false & Partial<...> ? Extract<...> : Partial<...> extends string | readonly any[] ? never : Partial<...> extends ArrayLike<...> | Iterable<...> ? Extract<...> : never) | (true exte...' is not assignable to parameter of type 'Partial<unknown>[]'.error TS2322: Type '(T | (T[] | (T extends any ? (true extends false & T ? Extract<any[], T> : T extends string | readonly any[] ? never : T extends ArrayLike<infer U> | Iterable<...> ? Extract<...> : never) | (true extends false & T ? never : {} extends Required<...> ? T & any[] : Extract<...>) : never) | (T | T[])[])[number])[]' is not assignable to type 'T[]'.error TS2322: Type '(T | (T[] | (T extends any ? (true extends false & T ? Extract<any[], T> : T extends string | readonly any[] ? never : T extends ArrayLike<infer U> | Iterable<...> ? Extract<...> : never) | (true extends false & T ? never : {} extends Required<...> ? T & any[] : Extract<...>) : never) | (T | ... 1 more ... | undefin...' is not assignable to type '(T | undefined)[]'.error TS2322: Type '(T | T[] | (T[] | (T extends any ? (true extends false & T ? Extract<any[], T> : T extends string | readonly any[] ? never : T extends ArrayLike<...> | Iterable<...> ? Extract<...> : never) | (true extends false & T ? never : {} extends Required<...> ? T & any[] : Extract<...>) : never) | (T | T[])[])[number])[]' is not assignable to type 'T[]'.
ReactiveX/rxjs
8 of 13 projects failed to build with the old tsc and were ignored
src/tsconfig.cjs.spec.json
error TS2322: Type 'T[] | (T extends any ? (true extends false & T ? Extract<any[], T> : T extends string | readonly any[] ? never : T extends ArrayLike<infer U> | Iterable<...> ? Extract<...> : never) | (true extends false & T ? never : {} extends Required<...> ? T & any[] : Extract<...>) : never) | (O extends any ? (true extends fals...' is not assignable to type 'T[]'.error TS2322: Type 'T[] | (T extends any ? (true extends false & T ? Extract<any[], T> : T extends string | readonly any[] ? never : T extends ArrayLike<infer U> | Iterable<...> ? Extract<...> : never) | (true extends false & T ? never : {} extends Required<...> ? T & any[] : Extract<...>) : never)' is not assignable to type 'T[]'.
src/tsconfig.esm5.rollup.json
error TS2322: Type 'T[] | (T extends any ? (true extends false & T ? Extract<any[], T> : T extends string | readonly any[] ? never : T extends ArrayLike<infer U> | Iterable<...> ? Extract<...> : never) | (true extends false & T ? never : {} extends Required<...> ? T & any[] : Extract<...>) : never) | (O extends any ? (true extends fals...' is not assignable to type 'T[]'.error TS2322: Type 'T[] | (T extends any ? (true extends false & T ? Extract<any[], T> : T extends string | readonly any[] ? never : T extends ArrayLike<infer U> | Iterable<...> ? Extract<...> : never) | (true extends false & T ? never : {} extends Required<...> ? T & any[] : Extract<...>) : never)' is not assignable to type 'T[]'.
src/tsconfig.types.json
error TS2322: Type 'T[] | (T extends any ? (true extends false & T ? Extract<any[], T> : T extends string | readonly any[] ? never : T extends ArrayLike<infer U> | Iterable<...> ? Extract<...> : never) | (true extends false & T ? never : {} extends Required<...> ? T & any[] : Extract<...>) : never) | (O extends any ? (true extends fals...' is not assignable to type 'T[]'.error TS2322: Type 'T[] | (T extends any ? (true extends false & T ? Extract<any[], T> : T extends string | readonly any[] ? never : T extends ArrayLike<infer U> | Iterable<...> ? Extract<...> : never) | (true extends false & T ? never : {} extends Required<...> ? T & any[] : Extract<...>) : never)' is not assignable to type 'T[]'.
refined-github/refined-github
tsconfig.json
error TS2322: Type 'Item[] | (Item extends any ? (true extends false & Item ? Extract<any[], Item> : Item extends string | readonly any[] ? never : Item extends ArrayLike<...> | Iterable<...> ? Extract<...> : never) | (true extends false & Item ? never : {} extends Required<...> ? Item & any[] : Extract<...>) : never)' is not assignable to type 'Item[]'.
statelyai/xstate
6 of 20 projects failed to build with the old tsc and were ignored
packages/xstate-inspect/tsconfig.json
error TS2322: Type 'TransitionsConfigArray<TContext, TEvent> | (TransitionsConfigMap<TContext, TEvent> extends any ? (true extends false & TransitionsConfigMap<...> ? Extract<...> : TransitionsConfigMap<...> extends string | readonly any[] ? never : TransitionsConfigMap<...> extends ArrayLike<...> | Iterable<...> ? Extract<...> : never...' is not assignable to type '(TransitionConfig<TContext, EventObject> & { event: string; })[]'.
packages/xstate-test/tsconfig.json
error TS2322: Type 'TransitionsConfigArray<TContext, TEvent> | (TransitionsConfigMap<TContext, TEvent> extends any ? (true extends false & TransitionsConfigMap<...> ? Extract<...> : TransitionsConfigMap<...> extends string | readonly any[] ? never : TransitionsConfigMap<...> extends ArrayLike<...> | Iterable<...> ? Extract<...> : never...' is not assignable to type '(TransitionConfig<TContext, EventObject> & { event: string; })[]'.
typeorm/typeorm
tsconfig.json
error TS2322: Type '_QueryDeepPartialEntity<ObjectLiteral extends Entity ? unknown : Entity>[] | (_QueryDeepPartialEntity<ObjectLiteral extends Entity ? unknown : Entity> extends any ? (true extends false & _QueryDeepPartialEntity<...> ? Extract<...> : _QueryDeepPartialEntity<...> extends string | readonly any[] ? never : _QueryDeepPar...' is not assignable to type '_QueryDeepPartialEntity<ObjectLiteral extends Entity ? unknown : Entity>[]'.error TS2345: Argument of type '_QueryDeepPartialEntity<ObjectLiteral extends Entity ? unknown : Entity>[] | (_QueryDeepPartialEntity<ObjectLiteral extends Entity ? unknown : Entity> extends any ? (true extends false & _QueryDeepPartialEntity<...> ? Extract<...> : _QueryDeepPartialEntity<...> extends string | readonly any[] ? never : _QueryDeepPar...' is not assignable to parameter of type 'ObjectLiteral[]'.error TS7053: Element implicitly has an 'any' type because expression of type 'string | number | symbol' can't be used to index type 'string | number | symbol'.error TS2339: Property 'indexOf' does not exist on type 'never'.
Actually most of the cases above just work by adding an extends any constraint on the generic parameter (see the test cases I added). Perhaps it’s a separated but related problem. @sandersn, or perhaps @RyanCavanaugh, sorry to bother you again, but could you please inspect this?
@graphemecluster can you explain what the failures are like that would have been fixed by adding extends any? 4.8 did make unconstrained type parameters implicitly extend unknown instead of {}, and a common workaround was to add an explicit extends any. Maybe that's related.
Could you also add a detailed explanation of the new type of isArray? I read the type and couldn't understand the reason for almost any of its intricacies.
@sandersn A rough explanation looks like:
type ToArray<T> =
// Distribute it
T extends any ?
(
// if T == any, return any[]
true extends false & T ? Extract<any[], T> :
// if T is an array-like or iterable object but not string or array, return U[]
T extends string | readonly any[] ? never :
T extends ArrayLike<infer U> | Iterable<infer U> ? Extract<U[], T> :
// fallback to the bottom cases
never
) | (
// T == any has been covered above, so skip it
true extends false & T ? never :
// if T is any Record-like object (object with only index signature),
// intersect it with any array (this case should be rare, but a use
// case was found in test suite and being added to the test case file)
{} extends Required<T> ? T & any[] :
// otherwise, for cases not being covered by the above, extract all
// the arrays and readonly arrays out and dispose the remaining
Extract<T, readonly any[]>
)
: never;
There are no special reasons to separate the cases into two, but without this TypeScript may not think the result type is an array and fires error on test cases fc and fe (also see the earlier test suite result).
The use of Extract is to make sure that the predicate is assignable to the parameter type. (Using intersection instead, the result would be awful.)
Actually using extends unknown instead of extends any in test cases ff and fg does not affect the result at all, but it's not the case when the constraint is removed. That means there must be some problems with generic parameters without constraint in TypeScript.