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

Defer keyof (T & U) when constituents are generic #56652

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

Conversation

ahejlsberg
Copy link
Member

With this PR we defer normalization of keyof (T & U) where one or both are generic types. Normalization into keyof T | keyof U now occurs in getSimplifiedType (where we similarly normalize indexed access and conditional types).

type Foo = { x: string } | undefined;
type Bar = { y: string };

type FooAndBar = Foo & Bar;

type Keys<T, U> = keyof (T & U);  // Preserved as keyof (T & U), previously normalized to keyof T | keyof U

type K1 = keyof Foo;  // never
type K2 = keyof Bar;  // "y"
type K3 = Keys<Foo, Bar>;  // "x" | "y", but previously was just "y" due to normalization
type K4 = keyof (Foo & Bar);  // "x" | "y"

Fixes #51331.

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Dec 3, 2023
# Conflicts:
#	src/compiler/checker.ts
@ahejlsberg
Copy link
Member Author

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 3, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 3, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 3, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 3, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

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

Here they are:

Compiler

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Angular - node (v18.15.0, x64)
Memory used 295,391k (± 0.01%) 295,384k (± 0.01%) ~ 295,364k 295,436k p=0.810 n=6
Parse Time 2.64s (± 0.20%) 2.65s (± 0.39%) ~ 2.64s 2.67s p=0.070 n=6
Bind Time 0.82s (± 0.00%) 0.82s (± 0.50%) ~ 0.82s 0.83s p=0.405 n=6
Check Time 8.12s (± 0.34%) 8.11s (± 0.39%) ~ 8.08s 8.16s p=0.681 n=6
Emit Time 7.07s (± 0.21%) 7.09s (± 0.51%) ~ 7.05s 7.15s p=0.123 n=6
Total Time 18.65s (± 0.12%) 18.68s (± 0.22%) ~ 18.61s 18.72s p=0.127 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used 192,416k (± 1.24%) 192,420k (± 1.23%) ~ 191,396k 197,238k p=0.689 n=6
Parse Time 1.36s (± 0.60%) 1.35s (± 1.37%) ~ 1.33s 1.38s p=0.617 n=6
Bind Time 0.72s (± 0.00%) 0.72s (± 0.00%) ~ 0.72s 0.72s p=1.000 n=6
Check Time 9.26s (± 0.20%) 9.29s (± 0.26%) ~ 9.27s 9.32s p=0.062 n=6
Emit Time 2.62s (± 0.57%) 2.63s (± 0.39%) ~ 2.61s 2.64s p=0.802 n=6
Total Time 13.96s (± 0.09%) 13.99s (± 0.20%) +0.04s (+ 0.27%) 13.95s 14.02s p=0.032 n=6
Monaco - node (v18.15.0, x64)
Memory used 347,391k (± 0.00%) 347,387k (± 0.01%) ~ 347,343k 347,411k p=0.936 n=6
Parse Time 2.46s (± 0.42%) 2.46s (± 0.40%) ~ 2.45s 2.48s p=0.788 n=6
Bind Time 0.93s (± 0.44%) 0.92s (± 0.90%) ~ 0.91s 0.93s p=0.527 n=6
Check Time 6.91s (± 0.63%) 6.91s (± 0.44%) ~ 6.87s 6.96s p=0.570 n=6
Emit Time 4.05s (± 0.38%) 4.06s (± 0.61%) ~ 4.04s 4.11s p=0.565 n=6
Total Time 14.34s (± 0.41%) 14.36s (± 0.36%) ~ 14.29s 14.44s p=0.810 n=6
TFS - node (v18.15.0, x64)
Memory used 302,674k (± 0.01%) 302,680k (± 0.01%) ~ 302,647k 302,713k p=0.873 n=6
Parse Time 2.00s (± 0.88%) 2.00s (± 0.69%) ~ 1.98s 2.02s p=1.000 n=6
Bind Time 1.01s (± 1.20%) 1.01s (± 1.22%) ~ 0.99s 1.02s p=0.865 n=6
Check Time 6.29s (± 0.52%) 6.30s (± 0.61%) ~ 6.26s 6.36s p=0.748 n=6
Emit Time 3.58s (± 0.65%) 3.57s (± 0.42%) ~ 3.56s 3.60s p=0.517 n=6
Total Time 12.88s (± 0.45%) 12.88s (± 0.36%) ~ 12.82s 12.95s p=1.000 n=6
material-ui - node (v18.15.0, x64)
Memory used 506,731k (± 0.00%) 506,936k (± 0.00%) +204k (+ 0.04%) 506,892k 506,962k p=0.005 n=6
Parse Time 2.58s (± 0.45%) 2.58s (± 0.64%) ~ 2.57s 2.61s p=0.498 n=6
Bind Time 0.99s (± 1.18%) 0.99s (± 1.34%) ~ 0.97s 1.01s p=0.737 n=6
Check Time 16.83s (± 0.45%) 16.85s (± 0.40%) ~ 16.74s 16.93s p=0.520 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 20.40s (± 0.36%) 20.43s (± 0.37%) ~ 20.32s 20.54s p=0.630 n=6
xstate - node (v18.15.0, x64)
Memory used 512,762k (± 0.01%) 512,788k (± 0.02%) ~ 512,679k 512,889k p=0.810 n=6
Parse Time 3.28s (± 0.17%) 3.27s (± 0.25%) ~ 3.26s 3.28s p=0.088 n=6
Bind Time 1.54s (± 0.53%) 1.54s (± 0.34%) ~ 1.53s 1.54s p=0.929 n=6
Check Time 2.80s (± 0.45%) 2.81s (± 0.43%) ~ 2.80s 2.83s p=0.120 n=6
Emit Time 0.08s (± 0.00%) 0.08s (± 0.00%) ~ 0.08s 0.08s p=1.000 n=6
Total Time 7.69s (± 0.13%) 7.69s (± 0.21%) ~ 7.67s 7.72s p=0.868 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)
  • 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 user test suite comparing main and refs/pull/56652/merge:

There were infrastructure failures potentially unrelated to your change:

  • 2 instances 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

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

Branch only errors:

Package: mongoose-id-validator
Error:

Error: Errors in typescript@local for external dependencies:
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(197,28): error TS2313: Type parameter 'TSchemaOptions' has a circular constraint.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,85): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,180): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:176:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:135:9)

Package: mongoose-unique-validator
Error:

Error: Errors in typescript@local for external dependencies:
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(197,28): error TS2313: Type parameter 'TSchemaOptions' has a circular constraint.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,85): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,180): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:176:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:135:9)

Package: mongoose-geojson-schema
Error:

Error: Errors in typescript@local for external dependencies:
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(197,28): error TS2313: Type parameter 'TSchemaOptions' has a circular constraint.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,85): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,180): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:176:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:135:9)

Package: mongoose-simple-random
Error:

Error: Errors in typescript@local for external dependencies:
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(197,28): error TS2313: Type parameter 'TSchemaOptions' has a circular constraint.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,85): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,180): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:176:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:135:9)

Package: mongoose-sequence
Error:

Error: Errors in typescript@local for external dependencies:
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(197,28): error TS2313: Type parameter 'TSchemaOptions' has a circular constraint.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,85): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,180): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:176:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:135:9)

Package: koa2-ratelimit
Error:

Error: Errors in typescript@local for external dependencies:
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(197,28): error TS2313: Type parameter 'TSchemaOptions' has a circular constraint.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,85): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,180): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:176:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:135:9)

Package: mongoose-deep-populate
Error:

Error: Errors in typescript@local for external dependencies:
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(197,28): error TS2313: Type parameter 'TSchemaOptions' has a circular constraint.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,85): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,180): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:176:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:135:9)

Package: multer-gridfs-storage/v3
Error:

Error: Errors in typescript@local for external dependencies:
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(197,28): error TS2313: Type parameter 'TSchemaOptions' has a circular constraint.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,85): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,180): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:176:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:135:9)

Package: mongoose-autopopulate
Error:

Error: Errors in typescript@local for external dependencies:
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(197,28): error TS2313: Type parameter 'TSchemaOptions' has a circular constraint.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,85): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,180): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:176:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:135:9)

Package: multer-gridfs-storage
Error:

Error: Errors in typescript@local for external dependencies:
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(197,28): error TS2313: Type parameter 'TSchemaOptions' has a circular constraint.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,85): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,180): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:176:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:135:9)

Package: mongoose-auto-increment
Error:

Error: Errors in typescript@local for external dependencies:
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(197,28): error TS2313: Type parameter 'TSchemaOptions' has a circular constraint.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,85): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,180): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:176:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:135:9)

Package: mongoose-paginate
Error:

Error: Errors in typescript@local for external dependencies:
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(197,28): error TS2313: Type parameter 'TSchemaOptions' has a circular constraint.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,85): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,180): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:176:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:135:9)

Package: forest-express-mongoose
Error:

Error: Errors in typescript@local for external dependencies:
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(197,28): error TS2313: Type parameter 'TSchemaOptions' has a circular constraint.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,85): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,180): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:176:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:135:9)

Package: mongoose-mock
Error:

Error: Errors in typescript@local for external dependencies:
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(197,28): error TS2313: Type parameter 'TSchemaOptions' has a circular constraint.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,85): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,180): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:176:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:135:9)

Package: mongoose-lean-virtuals
Error:

Error: Errors in typescript@local for external dependencies:
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(197,28): error TS2313: Type parameter 'TSchemaOptions' has a circular constraint.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,85): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,180): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:176:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:135:9)

Package: passport-local-mongoose
Error:

Error: Errors in typescript@local for external dependencies:
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(197,28): error TS2313: Type parameter 'TSchemaOptions' has a circular constraint.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,85): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.
node_modules/.pnpm/[email protected]/node_modules/mongoose/types/index.d.ts(198,180): error TS2344: Type 'TSchemaOptions' does not satisfy the constraint 'Record<any, any>'.

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:176:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:135:9)

You can check the log here.

@typescript-bot
Copy link
Collaborator

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

Something interesting changed - please have a look.

Details

portainer/portainer

tsconfig.json

  • error TS2345: Argument of type '("values" | "onChange" | "errors" | PropNames<TProps>)[]' is not assignable to parameter of type 'Exclude<keyof (TProps & FormFieldProps<TValue>), number | symbol>[] & ([Exclude<keyof (TProps & FormFieldProps<TValue>), number | symbol>] extends [...] ? unknown : Exclude<...>)'.

@gabritto
Copy link
Member

@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 12, 2023

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 12, 2023

Hey @gabritto, 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/159083/artifacts?artifactName=tgz&fileId=3CBC57A5016B75939B8EBE869AE8AEDF3CB5EAF6C849AC5ECEA6A063AD339EA602&fileName=/typescript-5.4.0-insiders.20231212.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/[email protected]".;

# Conflicts:
#	tests/baselines/reference/controlFlowGenericTypes.types
#	tests/baselines/reference/indexedAccessRelation.types
#	tests/baselines/reference/keyRemappingKeyofResult.types
#	tests/baselines/reference/keyofAndIndexedAccess.types
#	tests/baselines/reference/keyofAndIndexedAccessErrors.types
#	tests/baselines/reference/keyofIntersection.types
#	tests/baselines/reference/mappedTypeConstraints.types
#	tests/baselines/reference/mappedTypes4.types
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
Development

Successfully merging this pull request may close these issues.

NonNullable is not resolved for a mapped type in a contextual parameter type from instantiated type alias
3 participants