Skip to content
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

Permit circular references in type arguments for object type aliases #57293

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ahejlsberg
Copy link
Member

With this PR we lift a long standing restriction and permit type arguments for object type aliases to circularly reference themselves. For example:

type Rec = Record<string, Rec>;  // Ok, previously was error

type Json = string | number | boolean | null | Json[] | Record<string, Json>;  // Ok, previously was error

type Fun<T> = () => T;
type RecFun = Fun<RecFun>;  // Ok, previously was error

type Tup<A, B> = [A, B];
type RecTup<T> = Tup<T, RecTup<T>> | null;  // Ok, previously was error

The PR specifically covers circular references in type arguments for type aliases that reference the following kinds of types:

  • References to generic classes
  • References to generic interfaces
  • Object type literals
  • Function type literals
  • Array type literals
  • Tuple type literals

Circular references in type arguments for type aliases that reference other kinds of types still aren't permitted. For example:

type TNode<T> = { type: "node", left: T, right: T };
type TLeaf<V> = { type: "leaf", value: V };
type TTree<V> = TNode<TTree<V>> | TLeaf<V>;  // Ok

type TLevel<V, T> = TNode<T> | TLeaf<V>;  // Ok
type TTree2<V> = TLevel<V, TTree2<V>>;  // Error

Above, instantiations of TNode<T> and TLeaf<V> are permitted to have circular type arguments because they are type aliases for object types. However, TLevel<V, T> does not permit circular type arguments because it is a type alias for a union type.

Fixes #35017.
Fixes #35164.
Fixes #41164.
Fixes #57034.

@typescript-bot
Copy link
Collaborator

Looks like you're introducing a change to the public API surface area. If this includes breaking changes, please document them on our wiki's API Breaking Changes page.

Also, please make sure @DanielRosenwasser and @RyanCavanaugh are aware of the changes, just as a heads up.

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Feb 4, 2024
@ahejlsberg
Copy link
Member Author

@typescript-bot test top200
@typescript-bot user test this
@typescript-bot run dt
@typescript-bot perf test this faster

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 4, 2024

Heya @ahejlsberg, I've started to run the faster perf test suite on this PR at ad0a847. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 4, 2024

Heya @ahejlsberg, I've started to run the diff-based top-repos suite on this PR at ad0a847. You can monitor the build here.

Update: The results are in! Part 1, Part 2, Part 3

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 4, 2024

Heya @ahejlsberg, I've started to run the diff-based user code test suite on this PR at ad0a847. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 4, 2024

Heya @ahejlsberg, I've started to run the parallelized Definitely Typed test suite on this PR at ad0a847. You can monitor the build here.

Update: The results are in!

Update: The results are in!

@typescript-bot
Copy link
Collaborator

@ahejlsberg Here are the results of running the user test suite comparing main and refs/pull/57293/merge:

There were infrastructure failures potentially unrelated to your change:

  • 1 instance of "Package install failed"

Otherwise...

Something interesting changed - please have a look.

Details

puppeteer

packages/browsers/test/src/tsconfig.json

@typescript-bot
Copy link
Collaborator

@ahejlsberg
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Angular - node (v18.15.0, x64)
Memory used 295,656k (± 0.01%) 295,650k (± 0.01%) ~ 295,631k 295,697k p=0.378 n=6
Parse Time 2.66s (± 0.28%) 2.67s (± 0.24%) ~ 2.66s 2.68s p=0.081 n=6
Bind Time 0.83s (± 1.32%) 0.83s (± 1.18%) ~ 0.82s 0.85s p=0.718 n=6
Check Time 8.22s (± 0.30%) 8.25s (± 0.38%) ~ 8.22s 8.30s p=0.226 n=6
Emit Time 7.09s (± 0.15%) 7.11s (± 0.33%) ~ 7.08s 7.14s p=0.287 n=6
Total Time 18.81s (± 0.19%) 18.86s (± 0.15%) +0.05s (+ 0.28%) 18.82s 18.90s p=0.024 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used 192,927k (± 1.25%) 192,938k (± 1.25%) ~ 191,465k 197,359k p=0.936 n=6
Parse Time 1.36s (± 1.20%) 1.35s (± 1.12%) ~ 1.33s 1.37s p=0.247 n=6
Bind Time 0.72s (± 0.00%) 0.72s (± 0.00%) ~ 0.72s 0.72s p=1.000 n=6
Check Time 9.37s (± 0.35%) 9.35s (± 0.18%) ~ 9.34s 9.38s p=0.332 n=6
Emit Time 2.61s (± 0.77%) 2.63s (± 0.51%) ~ 2.61s 2.65s p=0.139 n=6
Total Time 14.06s (± 0.35%) 14.05s (± 0.12%) ~ 14.03s 14.07s p=1.000 n=6
Monaco - node (v18.15.0, x64)
Memory used 347,460k (± 0.00%) 347,478k (± 0.01%) ~ 347,448k 347,506k p=0.109 n=6
Parse Time 2.48s (± 0.51%) 2.49s (± 0.59%) ~ 2.46s 2.50s p=0.198 n=6
Bind Time 0.92s (± 0.56%) 0.93s (± 0.56%) ~ 0.92s 0.93s p=0.311 n=6
Check Time 6.95s (± 0.49%) 6.97s (± 0.34%) ~ 6.94s 7.00s p=0.259 n=6
Emit Time 4.04s (± 0.26%) 4.06s (± 0.53%) ~ 4.03s 4.08s p=0.328 n=6
Total Time 14.41s (± 0.28%) 14.44s (± 0.31%) ~ 14.38s 14.49s p=0.147 n=6
TFS - node (v18.15.0, x64)
Memory used 302,850k (± 0.00%) 302,829k (± 0.01%) ~ 302,801k 302,860k p=0.092 n=6
Parse Time 2.02s (± 0.41%) 2.01s (± 0.75%) ~ 1.99s 2.03s p=0.310 n=6
Bind Time 1.00s (± 0.81%) 1.00s (± 0.41%) ~ 1.00s 1.01s p=1.000 n=6
Check Time 6.35s (± 0.57%) 6.36s (± 0.43%) ~ 6.32s 6.40s p=0.420 n=6
Emit Time 3.59s (± 0.33%) 3.61s (± 0.34%) ~ 3.59s 3.62s p=0.099 n=6
Total Time 12.96s (± 0.28%) 12.97s (± 0.27%) ~ 12.92s 13.01s p=0.520 n=6
material-ui - node (v18.15.0, x64)
Memory used 511,366k (± 0.00%) 511,201k (± 0.01%) -164k (- 0.03%) 511,166k 511,249k p=0.005 n=6
Parse Time 2.65s (± 0.31%) 2.66s (± 0.51%) ~ 2.64s 2.67s p=0.666 n=6
Bind Time 1.00s (± 0.52%) 0.99s (± 0.83%) -0.01s (- 1.00%) 0.98s 1.00s p=0.050 n=6
Check Time 17.26s (± 0.51%) 17.46s (± 0.28%) +0.19s (+ 1.12%) 17.40s 17.53s p=0.005 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 20.92s (± 0.41%) 21.10s (± 0.22%) +0.19s (+ 0.90%) 21.04s 21.17s p=0.005 n=6
mui-docs - node (v18.15.0, x64)
Memory used 1,710,863k (± 0.00%) 1,707,999k (± 0.00%) -2,864k (- 0.17%) 1,707,947k 1,708,034k p=0.005 n=6
Parse Time 6.61s (± 0.22%) 6.61s (± 0.54%) ~ 6.58s 6.68s p=1.000 n=6
Bind Time 2.39s (± 0.43%) 2.40s (± 0.51%) ~ 2.38s 2.41s p=0.784 n=6
Check Time 55.70s (± 0.41%) 56.00s (± 0.30%) +0.30s (+ 0.54%) 55.72s 56.17s p=0.045 n=6
Emit Time 0.16s (± 3.16%) 0.16s (± 2.52%) ~ 0.16s 0.17s p=0.595 n=6
Total Time 64.87s (± 0.33%) 65.17s (± 0.31%) +0.30s (+ 0.47%) 64.87s 65.42s p=0.045 n=6
self-build-src - node (v18.15.0, x64)
Memory used 2,413,073k (± 0.02%) 2,414,048k (± 0.04%) ~ 2,413,189k 2,415,817k p=0.093 n=6
Parse Time 4.90s (± 0.89%) 4.93s (± 1.37%) ~ 4.83s 5.03s p=0.575 n=6
Bind Time 1.89s (± 0.95%) 1.87s (± 0.73%) ~ 1.85s 1.89s p=0.139 n=6
Check Time 33.42s (± 0.50%) 33.71s (± 0.29%) +0.29s (+ 0.87%) 33.52s 33.80s p=0.013 n=6
Emit Time 2.71s (± 0.69%) 2.70s (± 1.62%) ~ 2.63s 2.75s p=0.810 n=6
Total Time 42.92s (± 0.38%) 43.22s (± 0.18%) +0.30s (+ 0.70%) 43.10s 43.30s p=0.020 n=6
self-compiler - node (v18.15.0, x64)
Memory used 418,657k (± 0.01%) 418,728k (± 0.03%) ~ 418,624k 418,933k p=0.173 n=6
Parse Time 2.86s (± 0.61%) 2.81s (± 2.86%) ~ 2.66s 2.90s p=0.125 n=6
Bind Time 1.08s (± 0.51%) 1.10s (± 5.03%) ~ 1.07s 1.21s p=0.663 n=6
Check Time 15.12s (± 0.28%) 15.18s (± 0.32%) ~ 15.14s 15.25s p=0.122 n=6
Emit Time 1.13s (± 0.46%) 1.14s (± 1.63%) ~ 1.12s 1.16s p=0.211 n=6
Total Time 20.18s (± 0.21%) 20.23s (± 0.28%) ~ 20.15s 20.30s p=0.126 n=6
vscode - node (v18.15.0, x64)
Memory used 2,813,707k (± 0.00%) 2,814,295k (± 0.00%) +588k (+ 0.02%) 2,814,243k 2,814,338k p=0.005 n=6
Parse Time 10.66s (± 0.38%) 10.64s (± 0.23%) ~ 10.61s 10.67s p=0.628 n=6
Bind Time 3.40s (± 0.16%) 3.40s (± 0.22%) ~ 3.39s 3.41s p=0.137 n=6
Check Time 59.94s (± 0.62%) 60.48s (± 0.68%) +0.53s (+ 0.89%) 60.09s 61.24s p=0.045 n=6
Emit Time 16.23s (± 0.45%) 16.11s (± 0.64%) ~ 15.99s 16.25s p=0.092 n=6
Total Time 90.24s (± 0.44%) 90.62s (± 0.52%) ~ 90.23s 91.54s p=0.298 n=6
webpack - node (v18.15.0, x64)
Memory used 393,467k (± 0.01%) 393,459k (± 0.01%) ~ 393,416k 393,542k p=0.810 n=6
Parse Time 3.10s (± 0.70%) 3.10s (± 0.75%) ~ 3.07s 3.13s p=0.747 n=6
Bind Time 1.40s (± 0.90%) 1.38s (± 1.16%) -0.02s (- 1.55%) 1.37s 1.41s p=0.038 n=6
Check Time 14.02s (± 0.24%) 13.98s (± 0.30%) ~ 13.92s 14.03s p=0.105 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 18.51s (± 0.18%) 18.46s (± 0.35%) ~ 18.36s 18.52s p=0.196 n=6
xstate - node (v18.15.0, x64)
Memory used 513,408k (± 0.01%) 513,332k (± 0.04%) ~ 513,163k 513,663k p=0.298 n=6
Parse Time 3.28s (± 0.27%) 3.28s (± 0.23%) ~ 3.27s 3.29s p=0.798 n=6
Bind Time 1.54s (± 0.49%) 1.54s (± 0.34%) ~ 1.53s 1.54s p=0.241 n=6
Check Time 2.84s (± 0.73%) 2.92s (± 1.17%) +0.07s (+ 2.64%) 2.86s 2.96s p=0.008 n=6
Emit Time 0.08s (± 4.99%) 0.08s (± 9.60%) ~ 0.07s 0.09s p=0.389 n=6
Total Time 7.75s (± 0.31%) 7.82s (± 0.43%) +0.07s (+ 0.92%) 7.77s 7.87s p=0.008 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Angular - node (v18.15.0, x64)
  • Compiler-Unions - node (v18.15.0, x64)
  • Monaco - node (v18.15.0, x64)
  • TFS - node (v18.15.0, x64)
  • material-ui - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@typescript-bot
Copy link
Collaborator

@ahejlsberg Here are the results of running the top-repos suite comparing main and refs/pull/57293/merge:

Something interesting changed - please have a look.

Details

immich-app/immich

3 of 6 projects failed to build with the old tsc and were ignored

server/tsconfig.build.json

server/tsconfig.json

jhipster/generator-jhipster

1 of 3 projects failed to build with the old tsc and were ignored

tsconfig.json

lobehub/lobe-chat

tsconfig.json

marmelab/react-admin

25 of 26 projects failed to build with the old tsc and were ignored

packages/ra-core/tsconfig.json

  • error TS2322: Type 'UseMutationResult<RecordType, MutationError, Partial<UseDeleteMutateParams<RecordType>>, unknown>' is not assignable to type 'UseMutationResult<RecordType, MutationError, Partial<DeleteParams<RecordType> & { resource?: string; }>, unknown>'.
  • error TS2322: Type 'UseMutationResult<RecordType["id"][], MutationError, Partial<UseDeleteManyMutateParams<RecordType>>, unknown>' is not assignable to type 'UseMutationResult<RecordType["id"][], MutationError, Partial<DeleteManyParams<RecordType> & { resource?: string; }>, unknown>'.
  • error TS2322: Type 'UseMutationResult<RecordType, MutationError, Partial<UseUpdateMutateParams<RecordType>>, unknown>' is not assignable to type 'UseMutationResult<RecordType, MutationError, Partial<UpdateParams<RecordType> & { resource?: string; }>, unknown>'.
  • error TS2322: Type 'UseMutationResult<RecordType["id"][], MutationError, Partial<UseUpdateManyMutateParams<RecordType>>, unknown>' is not assignable to type 'UseMutationResult<RecordType["id"][], MutationError, Partial<UpdateManyParams<Partial<RecordType>> & { resource?: string; }>, unknown>'.

nextauthjs/next-auth

15 of 38 projects failed to build with the old tsc and were ignored

packages/adapter-firebase/tsconfig.json

openai-translator/openai-translator

tsconfig.json

  • error TS2322: Type '(props: IThemedStyleProps) => { zIndex: number; color: string; position: string; width: string; height: string; cursor: string; left: string; bottom: string; paddingLeft: string; display: string; alignItems: string; background: string; backdropFilter: string; lineHeight?: undefined; } | { ...; }' is not assignable to type 'string | MinimalObservable<string | JssStyle<any, undefined> | null | undefined> | JssStyle<IThemedStyleProps, Theme> | JssStyle<...>[] | ((data: IThemedStyleProps & { ...; }) => string | ... 2 more ... | undefined)'.
  • error TS2322: Type '(props: IThemedStyleProps) => { position: string; backdropFilter: string; zIndex: number; left: number; top: number; width: string; boxSizing: string; padding: string; background: string; display: string; flexDirection: string; ... 7 more ...; minWidth?: undefined; } | { ...; }' is not assignable to type 'string | MinimalObservable<string | JssStyle<any, undefined> | null | undefined> | JssStyle<IThemedStyleProps, Theme> | JssStyle<...>[] | ((data: IThemedStyleProps & { ...; }) => string | ... 2 more ... | undefined)'.
  • error TS2322: Type '(props: IThemedStyleProps) => { paddingTop: string | undefined; display: string; flexDirection: string; }' is not assignable to type 'string | MinimalObservable<string | JssStyle<any, undefined> | null | undefined> | JssStyle<IThemedStyleProps, Theme> | JssStyle<...>[] | ((data: IThemedStyleProps & { ...; }) => string | ... 2 more ... | undefined)'.
  • error TS2322: Type '(props: IThemedStyleProps) => { position: string; minWidth: string; maxWidth: string | undefined; minHeight: string; background: string; borderRadius: string; boxSizing: string; padding: string; display: string; flexDirection: string; }' is not assignable to type 'string | MinimalObservable<string | JssStyle<any, undefined> | null | undefined> | JssStyle<IThemedStyleProps, Theme> | JssStyle<...>[] | ((data: IThemedStyleProps & { ...; }) => string | ... 2 more ... | undefined)'.

portainer/portainer

tsconfig.json

pubkey/rxdb

8 of 11 projects failed to build with the old tsc and were ignored

config/tsconfig.types.json

tsconfig.json

react-navigation/react-navigation

1 of 14 projects failed to build with the old tsc and were ignored

packages/core/tsconfig.build.json

tsconfig.json

@typescript-bot
Copy link
Collaborator

@ahejlsberg Here are some more interesting changes from running the top-repos suite

Details

reduxjs/reselect

docs/examples/tsconfig.json

  • error TS2554: Expected 1 arguments, but got 2.
  • error TS2352: Conversion of type '(<InputSelectorsObject extends SelectorsObject<any>, MemoizeFunction extends UnknownMemoizer = <Func extends AnyFunction>(func: Func, options?: WeakMapMemoizeOptions<ReturnType<Func>>) => Func & { clearCache: () => void; resultsCount: () => number; resetResultsCount: () => void; }, ArgsMemoizeFunction extends UnknownMemoizer = <Func extends AnyFunction>(func: Func, options?: WeakMapMemoizeOptions<ReturnType<Func>>) => Func & { clearCache: () => void; resultsCount: () => number; resetResultsCount: () => void; }>(inputSelectorsObject: InputSelectorsObject, selectorCreator?: CreateSelectorFunction<MemoizeFunction, ArgsMemoizeFunction, any>) => ((state: any, ...params: any[]) => any) & Simplify<OmitIndexSignature<ReturnType<ArgsMemoizeFunction>>> & { resultFunc: (...resultFuncArgs: any[]) => any; memoizedResultFunc: ((...resultFuncArgs: any[]) => any) & Simplify<OmitIndexSignature<ReturnType<MemoizeFunction>>>; lastResult: () => any; dependencies: Selector<any>[]; recomputations: () => number; resetRecomputations: () => void; dependencyRecomputations: () => number; resetDependencyRecomputations: () => void; } & { argsMemoize: ArgsMemoizeFunction; memoize: MemoizeFunction; }) & { withTypes: () => StructuredSelectorCreator<any>; }' to type 'StructuredSelectorCreator<any>' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.

test/tsconfig.json

tsconfig.json

  • error TS2352: Conversion of type '(<InputSelectorsObject extends SelectorsObject<any>, MemoizeFunction extends UnknownMemoizer = <Func extends AnyFunction>(func: Func, options?: WeakMapMemoizeOptions<ReturnType<Func>>) => Func & { clearCache: () => void; resultsCount: () => number; resetResultsCount: () => void; }, ArgsMemoizeFunction extends UnknownMemoizer = <Func extends AnyFunction>(func: Func, options?: WeakMapMemoizeOptions<ReturnType<Func>>) => Func & { clearCache: () => void; resultsCount: () => number; resetResultsCount: () => void; }>(inputSelectorsObject: InputSelectorsObject, selectorCreator?: CreateSelectorFunction<MemoizeFunction, ArgsMemoizeFunction, any>) => ((state: any, ...params: any[]) => any) & Simplify<OmitIndexSignature<ReturnType<ArgsMemoizeFunction>>> & { resultFunc: (...resultFuncArgs: any[]) => any; memoizedResultFunc: ((...resultFuncArgs: any[]) => any) & Simplify<OmitIndexSignature<ReturnType<MemoizeFunction>>>; lastResult: () => any; dependencies: Selector<any>[]; recomputations: () => number; resetRecomputations: () => void; dependencyRecomputations: () => number; resetDependencyRecomputations: () => void; } & { argsMemoize: ArgsMemoizeFunction; memoize: MemoizeFunction; }) & { withTypes: () => StructuredSelectorCreator<any>; }' to type 'StructuredSelectorCreator<any>' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.

type-tests/tsconfig.json

typescript_test/tsconfig.json

@typescript-bot
Copy link
Collaborator

@ahejlsberg Here are some more interesting changes from running the top-repos suite

Details

StanGirard/quivr

1 of 2 projects failed to build with the old tsc and were ignored

frontend/tsconfig.json

vuetifyjs/vuetify

3 of 7 projects failed to build with the old tsc and were ignored

packages/vuetify/tsconfig.checks.json

  • error TS2322: Type '{ $children: VNode<RendererNode, RendererElement, { [key: string]: any; }>[] | Element; defaults: { VBtn: { color: string | undefined; disabled: boolean; icon: boolean; ripple: boolean; text: string; variant: string; onClick: () => void; }; }; }' is not assignable to type 'IntrinsicAttributes & Partial<{}> & Omit<{ [x: string]: Prop<unknown, unknown> | null | undefined; $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; "v-slot:default"?: false | (() => VNodeChild) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps & {} & { [x: string]: Prop<unknown, unknown> | null | undefined; } & { $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; } & { "v-slot:default"?: false | (() => VNodeChild) | undefined; }, never>'.
  • error TS2322: Type 'PropType<DefaultsOptions>' is not assignable to type 'Prop<unknown, unknown> | null'.
  • error TS2345: Argument of type 'Ref<Prop<unknown, unknown> | null | undefined>' is not assignable to parameter of type 'MaybeRef<DefaultsInstance>'.
  • error TS2322: Type '{ $children: Element; defaults: { global: { elevation: number; }; VCard: { color: string; }; }; }' is not assignable to type 'IntrinsicAttributes & Partial<{}> & Omit<{ [x: string]: Prop<unknown, unknown> | null | undefined; $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; "v-slot:default"?: false | (() => VNodeChild) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps & {} & { [x: string]: Prop<unknown, unknown> | null | undefined; } & { $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; } & { "v-slot:default"?: false | (() => VNodeChild) | undefined; }, never>'.
  • error TS2322: Type '{ $children: Element; defaults: { VListItem: { active: boolean; activeColor: string | undefined; baseColor: string | undefined; color: string | undefined; prependIcon: false | IconValue; appendIcon: false | IconValue; title: string | undefined; value: any; }; }; }' is not assignable to type 'IntrinsicAttributes & Partial<{}> & Omit<{ [x: string]: Prop<unknown, unknown> | null | undefined; $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; "v-slot:default"?: false | (() => VNodeChild) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps & {} & { [x: string]: Prop<unknown, unknown> | null | undefined; } & { $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; } & { "v-slot:default"?: false | (() => VNodeChild) | undefined; }, never>'.
  • error TS2322: Type '{ $children: Element; defaults: { VBtn: { variant: string; ripple: boolean; slim: boolean; }; }; }' is not assignable to type 'IntrinsicAttributes & Partial<{}> & Omit<{ [x: string]: Prop<unknown, unknown> | null | undefined; $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; "v-slot:default"?: false | (() => VNodeChild) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps & {} & { [x: string]: Prop<unknown, unknown> | null | undefined; } & { $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; } & { "v-slot:default"?: false | (() => VNodeChild) | undefined; }, never>'.
  • error TS2322: Type '{ $children: VNode<RendererNode, RendererElement, { [key: string]: any; }>[] | Element; defaults: { VBtn: { disabled: boolean; text: string; variant: string; }; }; }' is not assignable to type 'IntrinsicAttributes & Partial<{}> & Omit<{ [x: string]: Prop<unknown, unknown> | null | undefined; $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; "v-slot:default"?: false | (() => VNodeChild) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps & {} & { [x: string]: Prop<unknown, unknown> | null | undefined; } & { $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; } & { "v-slot:default"?: false | (() => VNodeChild) | undefined; }, never>'.
  • error TS2322: Type '{ $children: VNode<RendererNode, RendererElement, { [key: string]: any; }>[] | Element; defaults: { VBtn: { color: string | undefined; disabled: boolean; text: string; variant: string; }; }; }' is not assignable to type 'IntrinsicAttributes & Partial<{}> & Omit<{ [x: string]: Prop<unknown, unknown> | null | undefined; $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; "v-slot:default"?: false | (() => VNodeChild) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps & {} & { [x: string]: Prop<unknown, unknown> | null | undefined; } & { $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; } & { "v-slot:default"?: false | (() => VNodeChild) | undefined; }, never>'.
  • error TS2322: Type '{ $children: Element; defaults: { VTabs: { height: string; }; }; }' is not assignable to type 'IntrinsicAttributes & Partial<{}> & Omit<{ [x: string]: Prop<unknown, unknown> | null | undefined; $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; "v-slot:default"?: false | (() => VNodeChild) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps & {} & { [x: string]: Prop<unknown, unknown> | null | undefined; } & { $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; } & { "v-slot:default"?: false | (() => VNodeChild) | undefined; }, never>'.
  • error TS2322: Type '{ $children: Element; defaults: { VBtn: { slim: boolean; variant: string; }; }; }' is not assignable to type 'IntrinsicAttributes & Partial<{}> & Omit<{ [x: string]: Prop<unknown, unknown> | null | undefined; $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; "v-slot:default"?: false | (() => VNodeChild) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps & {} & { [x: string]: Prop<unknown, unknown> | null | undefined; } & { $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; } & { "v-slot:default"?: false | (() => VNodeChild) | undefined; }, never>'.

packages/vuetify/tsconfig.dist.json

  • error TS2322: Type '{ $children: VNode<RendererNode, RendererElement, { [key: string]: any; }>[] | Element; defaults: { VBtn: { color: string | undefined; disabled: boolean; icon: boolean; ripple: boolean; text: string; variant: string; onClick: () => void; }; }; }' is not assignable to type 'IntrinsicAttributes & Partial<{}> & Omit<{ [x: string]: Prop<unknown, unknown> | null | undefined; $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; "v-slot:default"?: false | (() => VNodeChild) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps & {} & { [x: string]: Prop<unknown, unknown> | null | undefined; } & { $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; } & { "v-slot:default"?: false | (() => VNodeChild) | undefined; }, never>'.
  • error TS2322: Type 'PropType<DefaultsOptions>' is not assignable to type 'Prop<unknown, unknown> | null'.
  • error TS2345: Argument of type 'Ref<Prop<unknown, unknown> | null | undefined>' is not assignable to parameter of type 'MaybeRef<DefaultsInstance>'.
  • error TS2322: Type '{ $children: Element; defaults: { VListItem: { active: boolean; activeColor: string | undefined; baseColor: string | undefined; color: string | undefined; prependIcon: false | IconValue; appendIcon: false | IconValue; title: string | undefined; value: any; }; }; }' is not assignable to type 'IntrinsicAttributes & Partial<{}> & Omit<{ [x: string]: Prop<unknown, unknown> | null | undefined; $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; "v-slot:default"?: false | (() => VNodeChild) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps & {} & { [x: string]: Prop<unknown, unknown> | null | undefined; } & { $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; } & { "v-slot:default"?: false | (() => VNodeChild) | undefined; }, never>'.
  • error TS2322: Type '{ $children: Element; defaults: { VBtn: { variant: string; ripple: boolean; slim: boolean; }; }; }' is not assignable to type 'IntrinsicAttributes & Partial<{}> & Omit<{ [x: string]: Prop<unknown, unknown> | null | undefined; $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; "v-slot:default"?: false | (() => VNodeChild) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps & {} & { [x: string]: Prop<unknown, unknown> | null | undefined; } & { $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; } & { "v-slot:default"?: false | (() => VNodeChild) | undefined; }, never>'.
  • error TS2322: Type '{ $children: VNode<RendererNode, RendererElement, { [key: string]: any; }>[] | Element; defaults: { VBtn: { disabled: boolean; text: string; variant: string; }; }; }' is not assignable to type 'IntrinsicAttributes & Partial<{}> & Omit<{ [x: string]: Prop<unknown, unknown> | null | undefined; $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; "v-slot:default"?: false | (() => VNodeChild) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps & {} & { [x: string]: Prop<unknown, unknown> | null | undefined; } & { $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; } & { "v-slot:default"?: false | (() => VNodeChild) | undefined; }, never>'.
  • error TS2322: Type '{ $children: VNode<RendererNode, RendererElement, { [key: string]: any; }>[] | Element; defaults: { VBtn: { color: string | undefined; disabled: boolean; text: string; variant: string; }; }; }' is not assignable to type 'IntrinsicAttributes & Partial<{}> & Omit<{ [x: string]: Prop<unknown, unknown> | null | undefined; $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; "v-slot:default"?: false | (() => VNodeChild) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps & {} & { [x: string]: Prop<unknown, unknown> | null | undefined; } & { $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; } & { "v-slot:default"?: false | (() => VNodeChild) | undefined; }, never>'.
  • error TS2322: Type '{ $children: Element; defaults: { VTabs: { height: string; }; }; }' is not assignable to type 'IntrinsicAttributes & Partial<{}> & Omit<{ [x: string]: Prop<unknown, unknown> | null | undefined; $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; "v-slot:default"?: false | (() => VNodeChild) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps & {} & { [x: string]: Prop<unknown, unknown> | null | undefined; } & { $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; } & { "v-slot:default"?: false | (() => VNodeChild) | undefined; }, never>'.
  • error TS2322: Type '{ $children: Element; defaults: { VBtn: { slim: boolean; variant: string; }; }; }' is not assignable to type 'IntrinsicAttributes & Partial<{}> & Omit<{ [x: string]: Prop<unknown, unknown> | null | undefined; $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; "v-slot:default"?: false | (() => VNodeChild) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps & {} & { [x: string]: Prop<unknown, unknown> | null | undefined; } & { $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; } & { "v-slot:default"?: false | (() => VNodeChild) | undefined; }, never>'.

packages/vuetify/tsconfig.json

  • error TS2322: Type '{ $children: VNode<RendererNode, RendererElement, { [key: string]: any; }>[] | Element; defaults: { VBtn: { color: string | undefined; disabled: boolean; icon: boolean; ripple: boolean; text: string; variant: string; onClick: () => void; }; }; }' is not assignable to type 'IntrinsicAttributes & Partial<{}> & Omit<{ [x: string]: Prop<unknown, unknown> | null | undefined; $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; "v-slot:default"?: false | (() => VNodeChild) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps & {} & { [x: string]: Prop<unknown, unknown> | null | undefined; } & { $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; } & { "v-slot:default"?: false | (() => VNodeChild) | undefined; }, never>'.
  • error TS2322: Type 'PropType<DefaultsOptions>' is not assignable to type 'Prop<unknown, unknown> | null'.
  • error TS2345: Argument of type 'Ref<Prop<unknown, unknown> | null | undefined>' is not assignable to parameter of type 'MaybeRef<DefaultsInstance>'.
  • error TS2322: Type '{ $children: Element; defaults: { global: { elevation: number; }; VCard: { color: string; }; }; }' is not assignable to type 'IntrinsicAttributes & Partial<{}> & Omit<{ [x: string]: Prop<unknown, unknown> | null | undefined; $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; "v-slot:default"?: false | (() => VNodeChild) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps & {} & { [x: string]: Prop<unknown, unknown> | null | undefined; } & { $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; } & { "v-slot:default"?: false | (() => VNodeChild) | undefined; }, never>'.
  • error TS2322: Type '{ $children: Element; defaults: { VListItem: { active: boolean; activeColor: string | undefined; baseColor: string | undefined; color: string | undefined; prependIcon: false | IconValue; appendIcon: false | IconValue; title: string | undefined; value: any; }; }; }' is not assignable to type 'IntrinsicAttributes & Partial<{}> & Omit<{ [x: string]: Prop<unknown, unknown> | null | undefined; $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; "v-slot:default"?: false | (() => VNodeChild) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps & {} & { [x: string]: Prop<unknown, unknown> | null | undefined; } & { $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; } & { "v-slot:default"?: false | (() => VNodeChild) | undefined; }, never>'.
  • error TS2322: Type '{ $children: Element; defaults: { VBtn: { variant: string; ripple: boolean; slim: boolean; }; }; }' is not assignable to type 'IntrinsicAttributes & Partial<{}> & Omit<{ [x: string]: Prop<unknown, unknown> | null | undefined; $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; "v-slot:default"?: false | (() => VNodeChild) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps & {} & { [x: string]: Prop<unknown, unknown> | null | undefined; } & { $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; } & { "v-slot:default"?: false | (() => VNodeChild) | undefined; }, never>'.
  • error TS2322: Type '{ $children: VNode<RendererNode, RendererElement, { [key: string]: any; }>[] | Element; defaults: { VBtn: { disabled: boolean; text: string; variant: string; }; }; }' is not assignable to type 'IntrinsicAttributes & Partial<{}> & Omit<{ [x: string]: Prop<unknown, unknown> | null | undefined; $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; "v-slot:default"?: false | (() => VNodeChild) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps & {} & { [x: string]: Prop<unknown, unknown> | null | undefined; } & { $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; } & { "v-slot:default"?: false | (() => VNodeChild) | undefined; }, never>'.
  • error TS2322: Type '{ $children: VNode<RendererNode, RendererElement, { [key: string]: any; }>[] | Element; defaults: { VBtn: { color: string | undefined; disabled: boolean; text: string; variant: string; }; }; }' is not assignable to type 'IntrinsicAttributes & Partial<{}> & Omit<{ [x: string]: Prop<unknown, unknown> | null | undefined; $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; "v-slot:default"?: false | (() => VNodeChild) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps & {} & { [x: string]: Prop<unknown, unknown> | null | undefined; } & { $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; } & { "v-slot:default"?: false | (() => VNodeChild) | undefined; }, never>'.
  • error TS2322: Type '{ $children: Element; defaults: { VTabs: { height: string; }; }; }' is not assignable to type 'IntrinsicAttributes & Partial<{}> & Omit<{ [x: string]: Prop<unknown, unknown> | null | undefined; $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; "v-slot:default"?: false | (() => VNodeChild) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps & {} & { [x: string]: Prop<unknown, unknown> | null | undefined; } & { $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; } & { "v-slot:default"?: false | (() => VNodeChild) | undefined; }, never>'.
  • error TS2322: Type '{ $children: Element; defaults: { VBtn: { slim: boolean; variant: string; }; }; }' is not assignable to type 'IntrinsicAttributes & Partial<{}> & Omit<{ [x: string]: Prop<unknown, unknown> | null | undefined; $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; "v-slot:default"?: false | (() => VNodeChild) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps & {} & { [x: string]: Prop<unknown, unknown> | null | undefined; } & { $children?: VNodeChild | (() => VNodeChild) | { default?: (() => VNodeChild) | undefined; }; 'v-slots'?: { default?: false | (() => VNodeChild) | undefined; } | undefined; } & { "v-slot:default"?: false | (() => VNodeChild) | undefined; }, never>'.

@typescript-bot
Copy link
Collaborator

Hey @ahejlsberg, it looks like the DT test run failed. Please check the log for more details.
You can check the log here.

@typescript-bot
Copy link
Collaborator

Hey @ahejlsberg, the results of running the DT tests are ready.
There were interesting changes:

Branch only errors:

Package: ramda
Error:

Error: 
/home/vsts/work/1/DefinitelyTyped/types/ramda/test/curry-tests.ts
  20:24  error  TypeScript@local compile error: 
This expression is not callable.
  Type 'Number' has no call signatures  @definitelytyped/expect
  24:24  error  TypeScript@local compile error: 
This expression is not callable.
  Type 'Number' has no call signatures  @definitelytyped/expect

/home/vsts/work/1/DefinitelyTyped/types/ramda/test/curryN-tests.ts
  20:5  error  TypeScript@local compile error: 
This expression is not callable.
  Type 'Number' has no call signatures  @definitelytyped/expect
  20:5  error  TypeScript@local expected type to be:
  number
got:
  any                                                 @definitelytyped/expect
  21:5  error  TypeScript@local compile error: 
This expression is not callable.
  Type 'Number' has no call signatures  @definitelytyped/expect
  21:5  error  TypeScript@local expected type to be:
  number
got:
  any                                                 @definitelytyped/expect

✖ 6 problems (6 errors, 0 warnings)

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.6_typescript@5.4.0-dev.20240204/node_modules/@definitelytyped/dtslint/dist/index.js:199:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.6_typescript@5.4.0-dev.20240204/node_modules/@definitelytyped/dtslint/dist/index.js:137:9)

Package: redis-info
Error:

Error: 
/home/vsts/work/1/DefinitelyTyped/types/redis-info/redis-info-tests.ts
   9:10  error  TypeScript@local compile error: 
Property 'master_host' does not exist on type 'RedisInfo'                     @definitelytyped/expect
  11:14  error  TypeScript@local compile error: 
Property 'master_sync_in_progress' does not exist on type 'RedisInfo'         @definitelytyped/expect
  15:14  error  TypeScript@local compile error: 
Property 'master_sync_left_bytes' does not exist on type 'RedisInfo'          @definitelytyped/expect
  18:14  error  TypeScript@local compile error: 
Property 'master_link_status' does not exist on type 'RedisInfo'              @definitelytyped/expect
  22:14  error  TypeScript@local compile error: 
Property 'master_link_down_since_seconds' does not exist on type 'RedisInfo'  @definitelytyped/expect
  30:10  error  TypeScript@local compile error: 
Property 'aof_pending_rewrite' does not exist on type 'RedisInfo'             @definitelytyped/expect
  37:10  error  TypeScript@local compile error: 
Property 'loading_start_time' does not exist on type 'RedisInfo'              @definitelytyped/expect

✖ 7 problems (7 errors, 0 warnings)

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.6_typescript@5.4.0-dev.20240204/node_modules/@definitelytyped/dtslint/dist/index.js:199:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.6_typescript@5.4.0-dev.20240204/node_modules/@definitelytyped/dtslint/dist/index.js:137:9)

You can check the log here.

@@ -13,7 +13,7 @@ interface Foo {
}

export type Bar = Omit<Foo, "c">;
>Bar : { a: string; b: number; }
>Bar : { b: number; a: string; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why'd this change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has to do with the order in which the literal types were materialized. Because we defer the Omit instantiations, we end up materializing the "b" and "c" literal types before we materialize "a". Since Omit is non-homomorphic and since unions are ordered by type ID, this ends up flipping the properties.

@DanielRosenwasser
Copy link
Member

@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 5, 2024

Heya @DanielRosenwasser, I've started to run the tarball bundle task on this PR at 81efc86. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 5, 2024

Hey @DanielRosenwasser, I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
    "devDependencies": {
        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/159769/artifacts?artifactName=tgz&fileId=88D226C4CA6139B6CD7F5FCADE558322B92937C2C1E185F49F818817905B7FD902&fileName=/typescript-5.4.0-insiders.20240205.tgz"
    }
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/pr-build@5.4.0-pr-57293-15".;

@DanielRosenwasser
Copy link
Member

type Loopy1<T> = Loopy2<T>;
type Loopy2<T> = Record<string, keyof Loopy1<T>>;

Seems to cause a stack overflow in the playground.

@dgreensp
Copy link

Does this cover the basic case of aliasing a class?

class Box<T> {
  t!: T;
}

type MyBox<T> = Box<T>;

type Foo = number | Box<Foo>; // this is fine
type Bar = number | MyBox<Bar>; // error, circular reference

I'm hitting this problem in my code, and the alias is needed for other reasons, making this hard to work around.

What is the status of this PR?

@ahejlsberg
Copy link
Member Author

@dgreensp Yes, it covers that scenario. However, it's not clear the implementation approach in the PR is viable, so we're still thinking about solutions. I can say for sure it won't be in the 5.5 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
Status: Waiting on reviewers
4 participants