Skip to content

Include all properties from the mapped modifier type when calculating… #41976

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

Merged
merged 2 commits into from
Jan 27, 2021

Conversation

weswigham
Copy link
Member

… index types for mapped types with name types. Previously, when only inspecting the constraint, we'd miss the mapping for any properties which subtype reduced with the constraint. When we return the constraint as the index, this is fine, however when we perform a mapping over the keys, we really need to start with the full list of keys, before any subtype reduction takes place. By looking at the list of properties like this, we ensure we can include the result of their mapping in the resulting key type.

Fixes #41966

… index types for mapped types with name types
@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Dec 15, 2020
@weswigham
Copy link
Member Author

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 15, 2020

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 15, 2020

Heya @weswigham, I've started to run the perf test suite on this PR at 597a9c6. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 15, 2020

Heya @weswigham, I've started to run the parallelized community code test suite on this PR at 597a9c6. You can monitor the build here.

@RyanCavanaugh
Copy link
Member

@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 15, 2020

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

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - master..41976

Metric master 41976 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 345,057k (± 0.02%) 345,051k (± 0.02%) -6k (- 0.00%) 344,937k 345,257k
Parse Time 1.99s (± 0.47%) 1.98s (± 0.46%) -0.01s (- 0.40%) 1.96s 2.00s
Bind Time 0.83s (± 0.63%) 0.83s (± 0.58%) -0.00s (- 0.48%) 0.82s 0.84s
Check Time 5.00s (± 0.40%) 4.99s (± 0.54%) -0.01s (- 0.22%) 4.94s 5.05s
Emit Time 5.35s (± 1.02%) 5.35s (± 0.80%) +0.00s (+ 0.04%) 5.28s 5.47s
Total Time 13.16s (± 0.53%) 13.15s (± 0.36%) -0.02s (- 0.14%) 13.05s 13.27s
Compiler-Unions - node (v10.16.3, x64)
Memory used 205,426k (± 0.05%) 205,430k (± 0.04%) +5k (+ 0.00%) 205,185k 205,575k
Parse Time 0.79s (± 0.70%) 0.79s (± 0.63%) -0.01s (- 0.76%) 0.78s 0.80s
Bind Time 0.49s (± 0.74%) 0.50s (± 1.37%) +0.00s (+ 0.40%) 0.48s 0.51s
Check Time 12.03s (± 0.70%) 12.04s (± 0.86%) +0.01s (+ 0.07%) 11.80s 12.24s
Emit Time 2.35s (± 1.52%) 2.34s (± 0.84%) -0.02s (- 0.72%) 2.30s 2.39s
Total Time 15.67s (± 0.70%) 15.66s (± 0.62%) -0.01s (- 0.06%) 15.47s 15.82s
Monaco - node (v10.16.3, x64)
Memory used 354,831k (± 0.03%) 354,827k (± 0.02%) -4k (- 0.00%) 354,705k 354,984k
Parse Time 1.60s (± 0.42%) 1.60s (± 0.36%) +0.00s (+ 0.19%) 1.59s 1.62s
Bind Time 0.73s (± 0.69%) 0.72s (± 0.94%) -0.00s (- 0.00%) 0.72s 0.75s
Check Time 5.13s (± 0.54%) 5.11s (± 0.32%) -0.03s (- 0.51%) 5.06s 5.14s
Emit Time 2.81s (± 0.73%) 2.79s (± 0.50%) -0.02s (- 0.57%) 2.76s 2.82s
Total Time 10.26s (± 0.36%) 10.22s (± 0.21%) -0.04s (- 0.37%) 10.18s 10.27s
TFS - node (v10.16.3, x64)
Memory used 307,884k (± 0.02%) 307,929k (± 0.02%) +44k (+ 0.01%) 307,820k 308,108k
Parse Time 1.23s (± 0.71%) 1.23s (± 0.69%) +0.00s (+ 0.24%) 1.22s 1.26s
Bind Time 0.68s (± 0.50%) 0.68s (± 0.70%) -0.00s (- 0.00%) 0.67s 0.69s
Check Time 4.61s (± 0.53%) 4.59s (± 0.46%) -0.03s (- 0.56%) 4.54s 4.63s
Emit Time 2.94s (± 1.16%) 2.93s (± 0.79%) -0.02s (- 0.54%) 2.87s 2.98s
Total Time 9.47s (± 0.53%) 9.43s (± 0.31%) -0.04s (- 0.43%) 9.36s 9.48s
material-ui - node (v10.16.3, x64)
Memory used 489,882k (± 0.01%) 489,815k (± 0.01%) -67k (- 0.01%) 489,734k 489,905k
Parse Time 2.06s (± 0.49%) 2.06s (± 0.47%) -0.00s (- 0.15%) 2.04s 2.09s
Bind Time 0.66s (± 1.02%) 0.65s (± 0.68%) -0.01s (- 0.76%) 0.64s 0.66s
Check Time 13.58s (± 0.88%) 13.60s (± 0.61%) +0.02s (+ 0.15%) 13.39s 13.83s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 16.30s (± 0.76%) 16.32s (± 0.52%) +0.02s (+ 0.11%) 16.10s 16.54s
Angular - node (v12.1.0, x64)
Memory used 322,792k (± 0.02%) 322,810k (± 0.02%) +18k (+ 0.01%) 322,656k 323,054k
Parse Time 1.96s (± 0.81%) 1.97s (± 0.74%) +0.01s (+ 0.56%) 1.94s 2.01s
Bind Time 0.81s (± 0.87%) 0.81s (± 0.64%) 0.00s ( 0.00%) 0.80s 0.82s
Check Time 4.91s (± 0.62%) 4.90s (± 0.55%) -0.02s (- 0.41%) 4.85s 4.97s
Emit Time 5.48s (± 0.51%) 5.52s (± 0.76%) +0.04s (+ 0.73%) 5.45s 5.60s
Total Time 13.17s (± 0.44%) 13.20s (± 0.51%) +0.03s (+ 0.23%) 13.08s 13.36s
Compiler-Unions - node (v12.1.0, x64)
Memory used 191,569k (± 0.06%) 191,608k (± 0.07%) +39k (+ 0.02%) 191,133k 191,783k
Parse Time 0.77s (± 0.52%) 0.77s (± 0.80%) -0.00s (- 0.26%) 0.75s 0.78s
Bind Time 0.49s (± 1.01%) 0.50s (± 0.99%) +0.00s (+ 0.20%) 0.49s 0.51s
Check Time 10.70s (± 0.48%) 10.73s (± 0.30%) +0.03s (+ 0.28%) 10.65s 10.80s
Emit Time 2.35s (± 1.13%) 2.35s (± 0.97%) +0.00s (+ 0.17%) 2.30s 2.41s
Total Time 14.32s (± 0.35%) 14.35s (± 0.30%) +0.04s (+ 0.27%) 14.28s 14.49s
Monaco - node (v12.1.0, x64)
Memory used 337,077k (± 0.02%) 337,057k (± 0.02%) -20k (- 0.01%) 336,897k 337,243k
Parse Time 1.58s (± 0.57%) 1.59s (± 0.52%) +0.00s (+ 0.25%) 1.57s 1.61s
Bind Time 0.70s (± 0.52%) 0.71s (± 0.48%) +0.00s (+ 0.43%) 0.70s 0.71s
Check Time 4.91s (± 0.36%) 4.90s (± 0.46%) -0.01s (- 0.10%) 4.86s 4.97s
Emit Time 2.86s (± 0.37%) 2.86s (± 0.77%) +0.00s (+ 0.07%) 2.82s 2.92s
Total Time 10.05s (± 0.20%) 10.06s (± 0.45%) +0.00s (+ 0.03%) 9.97s 10.13s
TFS - node (v12.1.0, x64)
Memory used 292,152k (± 0.02%) 292,227k (± 0.03%) +74k (+ 0.03%) 292,060k 292,476k
Parse Time 1.25s (± 0.66%) 1.25s (± 0.61%) -0.00s (- 0.08%) 1.23s 1.27s
Bind Time 0.65s (± 0.89%) 0.65s (± 0.80%) -0.00s (- 0.15%) 0.64s 0.66s
Check Time 4.51s (± 0.42%) 4.49s (± 0.42%) -0.02s (- 0.44%) 4.46s 4.54s
Emit Time 2.96s (± 1.15%) 2.95s (± 0.53%) -0.01s (- 0.37%) 2.93s 2.99s
Total Time 9.38s (± 0.52%) 9.35s (± 0.29%) -0.03s (- 0.33%) 9.29s 9.40s
material-ui - node (v12.1.0, x64)
Memory used 467,820k (± 0.06%) 467,864k (± 0.06%) +44k (+ 0.01%) 466,801k 468,091k
Parse Time 2.07s (± 0.22%) 2.07s (± 0.53%) +0.00s (+ 0.05%) 2.05s 2.11s
Bind Time 0.64s (± 0.81%) 0.64s (± 0.74%) +0.00s (+ 0.31%) 0.63s 0.65s
Check Time 12.07s (± 0.75%) 12.03s (± 0.58%) -0.04s (- 0.29%) 11.94s 12.21s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 14.78s (± 0.64%) 14.75s (± 0.47%) -0.04s (- 0.24%) 14.65s 14.91s
Angular - node (v8.9.0, x64)
Memory used 347,657k (± 0.02%) 347,683k (± 0.01%) +27k (+ 0.01%) 347,619k 347,840k
Parse Time 2.51s (± 0.28%) 2.52s (± 0.40%) +0.01s (+ 0.48%) 2.50s 2.55s
Bind Time 0.86s (± 0.82%) 0.86s (± 0.57%) +0.01s (+ 0.58%) 0.85s 0.87s
Check Time 5.63s (± 0.77%) 5.64s (± 0.36%) +0.01s (+ 0.23%) 5.61s 5.70s
Emit Time 6.32s (± 1.19%) 6.35s (± 1.18%) +0.04s (+ 0.60%) 6.26s 6.62s
Total Time 15.31s (± 0.63%) 15.38s (± 0.53%) +0.06s (+ 0.42%) 15.29s 15.65s
Compiler-Unions - node (v8.9.0, x64)
Memory used 213,206k (± 0.02%) 213,188k (± 0.02%) -18k (- 0.01%) 213,073k 213,258k
Parse Time 0.95s (± 0.62%) 0.95s (± 0.61%) -0.00s (- 0.10%) 0.94s 0.96s
Bind Time 0.58s (± 1.12%) 0.58s (± 0.77%) 0.00s ( 0.00%) 0.57s 0.59s
Check Time 14.79s (± 0.78%) 14.81s (± 0.60%) +0.02s (+ 0.15%) 14.54s 15.02s
Emit Time 2.74s (± 1.78%) 2.75s (± 1.88%) +0.01s (+ 0.40%) 2.61s 2.83s
Total Time 19.06s (± 0.67%) 19.09s (± 0.67%) +0.03s (+ 0.16%) 18.66s 19.34s
Monaco - node (v8.9.0, x64)
Memory used 358,817k (± 0.02%) 358,812k (± 0.02%) -5k (- 0.00%) 358,668k 358,961k
Parse Time 1.93s (± 0.40%) 1.93s (± 0.42%) +0.00s (+ 0.10%) 1.91s 1.95s
Bind Time 0.90s (± 0.75%) 0.91s (± 0.61%) +0.00s (+ 0.44%) 0.90s 0.92s
Check Time 5.68s (± 0.42%) 5.67s (± 0.55%) -0.01s (- 0.18%) 5.60s 5.73s
Emit Time 3.41s (± 0.51%) 3.42s (± 0.40%) +0.01s (+ 0.23%) 3.39s 3.45s
Total Time 11.93s (± 0.35%) 11.93s (± 0.28%) +0.00s (+ 0.04%) 11.84s 11.99s
TFS - node (v8.9.0, x64)
Memory used 310,545k (± 0.02%) 310,524k (± 0.02%) -22k (- 0.01%) 310,329k 310,645k
Parse Time 1.57s (± 0.43%) 1.57s (± 0.53%) -0.00s (- 0.00%) 1.54s 1.58s
Bind Time 0.68s (± 0.73%) 0.69s (± 0.65%) +0.00s (+ 0.44%) 0.68s 0.70s
Check Time 5.32s (± 0.60%) 5.32s (± 0.36%) +0.00s (+ 0.06%) 5.28s 5.37s
Emit Time 2.96s (± 0.83%) 2.97s (± 0.53%) +0.01s (+ 0.44%) 2.94s 3.01s
Total Time 10.53s (± 0.44%) 10.55s (± 0.26%) +0.02s (+ 0.18%) 10.49s 10.62s
material-ui - node (v8.9.0, x64)
Memory used 496,998k (± 0.01%) 497,073k (± 0.01%) +75k (+ 0.02%) 496,977k 497,155k
Parse Time 2.48s (± 0.37%) 2.49s (± 0.45%) +0.01s (+ 0.28%) 2.46s 2.51s
Bind Time 0.81s (± 1.42%) 0.81s (± 0.80%) -0.01s (- 0.62%) 0.79s 0.82s
Check Time 18.32s (± 0.30%) 18.36s (± 0.49%) +0.03s (+ 0.18%) 18.11s 18.52s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 21.62s (± 0.27%) 21.65s (± 0.44%) +0.03s (+ 0.15%) 21.42s 21.83s
Angular - node (v8.9.0, x86)
Memory used 199,454k (± 0.03%) 199,437k (± 0.02%) -17k (- 0.01%) 199,378k 199,528k
Parse Time 2.42s (± 0.64%) 2.42s (± 0.49%) -0.00s (- 0.04%) 2.40s 2.45s
Bind Time 1.02s (± 0.66%) 1.02s (± 1.17%) -0.01s (- 0.59%) 0.99s 1.05s
Check Time 5.10s (± 0.64%) 5.09s (± 0.43%) -0.02s (- 0.35%) 5.02s 5.13s
Emit Time 6.13s (± 0.80%) 6.11s (± 0.79%) -0.01s (- 0.23%) 5.96s 6.22s
Total Time 14.68s (± 0.47%) 14.64s (± 0.40%) -0.04s (- 0.29%) 14.48s 14.80s
Compiler-Unions - node (v8.9.0, x86)
Memory used 128,147k (± 0.04%) 128,146k (± 0.03%) -1k (- 0.00%) 128,061k 128,205k
Parse Time 0.96s (± 0.73%) 0.96s (± 0.88%) 0.00s ( 0.00%) 0.95s 0.99s
Bind Time 0.50s (± 0.89%) 0.49s (± 1.13%) -0.01s (- 1.20%) 0.48s 0.51s
Check Time 13.91s (± 0.33%) 13.88s (± 0.45%) -0.02s (- 0.17%) 13.76s 14.01s
Emit Time 2.68s (± 1.90%) 2.62s (± 1.26%) -0.06s (- 2.13%) 2.53s 2.71s
Total Time 18.05s (± 0.38%) 17.96s (± 0.42%) -0.09s (- 0.48%) 17.74s 18.10s
Monaco - node (v8.9.0, x86)
Memory used 203,292k (± 0.01%) 203,237k (± 0.02%) -55k (- 0.03%) 203,131k 203,319k
Parse Time 1.98s (± 0.86%) 1.98s (± 1.20%) +0.00s (+ 0.15%) 1.95s 2.06s
Bind Time 0.71s (± 0.84%) 0.72s (± 0.62%) +0.00s (+ 0.42%) 0.71s 0.73s
Check Time 5.72s (± 1.77%) 5.78s (± 1.47%) +0.06s (+ 1.03%) 5.55s 5.91s
Emit Time 2.86s (± 4.23%) 2.82s (± 3.60%) -0.04s (- 1.37%) 2.70s 3.16s
Total Time 11.27s (± 0.42%) 11.29s (± 0.61%) +0.03s (+ 0.22%) 11.17s 11.44s
TFS - node (v8.9.0, x86)
Memory used 177,632k (± 0.03%) 177,667k (± 0.02%) +36k (+ 0.02%) 177,539k 177,735k
Parse Time 1.61s (± 0.75%) 1.61s (± 1.03%) +0.00s (+ 0.25%) 1.58s 1.66s
Bind Time 0.65s (± 0.62%) 0.65s (± 0.61%) +0.00s (+ 0.31%) 0.64s 0.66s
Check Time 4.87s (± 0.82%) 4.89s (± 0.80%) +0.02s (+ 0.41%) 4.81s 4.97s
Emit Time 2.85s (± 1.05%) 2.84s (± 1.47%) -0.02s (- 0.63%) 2.75s 2.96s
Total Time 9.98s (± 0.62%) 9.99s (± 0.61%) +0.01s (+ 0.07%) 9.81s 10.09s
material-ui - node (v8.9.0, x86)
Memory used 279,876k (± 0.02%) 279,893k (± 0.02%) +17k (+ 0.01%) 279,754k 279,987k
Parse Time 2.54s (± 0.72%) 2.54s (± 0.56%) -0.00s (- 0.16%) 2.51s 2.58s
Bind Time 0.72s (± 4.77%) 0.73s (± 6.24%) +0.01s (+ 0.97%) 0.68s 0.85s
Check Time 16.57s (± 0.80%) 16.51s (± 0.61%) -0.07s (- 0.40%) 16.28s 16.84s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 19.84s (± 0.80%) 19.78s (± 0.47%) -0.06s (- 0.32%) 19.64s 20.08s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-197-generic
Architecturex64
Available Memory16 GB
Available Memory10 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v8.9.0, x64)
  • node (v8.9.0, x86)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v8.9.0, x64)
  • Angular - node (v8.9.0, x86)
  • Compiler-Unions - node (v10.16.3, x64)
  • Compiler-Unions - node (v12.1.0, x64)
  • Compiler-Unions - node (v8.9.0, x64)
  • Compiler-Unions - node (v8.9.0, x86)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v8.9.0, x64)
  • Monaco - node (v8.9.0, x86)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v8.9.0, x64)
  • TFS - node (v8.9.0, x86)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v8.9.0, x64)
  • material-ui - node (v8.9.0, x86)
Benchmark Name Iterations
Current 41976 10
Baseline master 10

@typescript-bot
Copy link
Collaborator

The user suite test run you requested has finished and failed. I've opened a PR with the baseline diff from master.

@weswigham
Copy link
Member Author

DT and the user tests look OK, perf seems fine.

>WithIndexKey : string | number

type WithoutIndexKey = keyof WithoutIndex; // number <-- Expected: "foo" | "bar"
>WithoutIndexKey : number | "foo" | "bar"
Copy link
Member

Choose a reason for hiding this comment

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

Is this right? WithoutIndex appears, at least in quick info, not to have an index signature at all (not sure if it’s represented differently under the hood), so it seems like you shouldn’t be allowed to index into it with number?

Copy link
Member

Choose a reason for hiding this comment

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

Slight simplification of the test case, FWIW:

type OmitIndex<T> = {
    [K in keyof T as (string extends K ? never : K)]: T[K];
};

type WithIndex = { [x: string]: unknown, foo: "hello", bar: "world" };
type WithoutIndex = OmitIndex<WithIndex>; // { foo: "hello"; bar: "world"; }                  <-- OK

type WithIndexKey = keyof WithIndex;
type WithoutIndexKey = keyof WithoutIndex; // number          <-- Expected: "foo" | "bar" 

Copy link
Member Author

@weswigham weswigham Jan 13, 2021

Choose a reason for hiding this comment

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

Arguable - the OmitIndex type is only omitting the string key, however, a string index signature adds both a string and number key to the keyof of the type, since a string index signature implies and allows indexing by number!

Copy link
Member

Choose a reason for hiding this comment

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

That makes sense, but two follow up questions:

  1. Why doesn’t quick info show the number index signature in WithoutIndex?
  2. How should the type { [K in keyof { [key: string]: any }]: K } be understood? Why isn’t it { [x: string]: string | number } or { [x: string]: string & number } or { [x: string]: string, [x: number]: number }?

Copy link
Member Author

Choose a reason for hiding this comment

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

For 1: The keyof logic includes number in the key type, however mapped type mappings iterate over the set of properties/indexes in the original modifiersType directly if available (and homomorphic), leading to the discrepancy.
As for 2: We have no principled answer and our behaviors are arbitrarily chosen. I think I went over the inconsistency at a design meeting just after key mappings were introduced and we decided to stick with all the inconsistencies so we didn't break anyone.

Copy link
Member

Choose a reason for hiding this comment

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

It feels troubling that

declare let withoutIndex: WithoutIndex;
withoutIndex[3];

is an error even though keyof typeof withoutIndex includes number. Is there any way to observe the numberyness of the keys besides keyof?

Copy link
Member Author

Choose a reason for hiding this comment

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

type WithIndex = { [x: string]: unknown, foo: "hello", bar: "world" };

type StringOrNumber = keyof WithIndex;

is already how keyof already works, so, we allow

declare const val: WithIndex;

val[12];

val[null as any as number];

The number-yness of string indexers is pretty visible everywhere it can be shown, IMO. I can't think of somewhere we actually forbid using a number on a string index signature... such a location would probably constitute a bug.

Copy link
Member Author

@weswigham weswigham Jan 27, 2021

Choose a reason for hiding this comment

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

is an error even though keyof typeof withoutIndex includes number.

You can blame this on how we construct mapped types. While the keyof result excludes string, mapped type construction actually doesn't use keyof at all for homomorphic mapped types (heh), and instead iterates over the slots visible on the modifiers type. If the string indexer has been filtered out it doesn't check "oh, well, maybe a number indexer is still appropriate given the filter applied to the modifier", it just drops it.

In any case, number is present in the keys is true both before and after this change, so I'm thinking probably doesn't have too much bearing on this change as-is? That could be a separate enhancement/change to how we create mapped types with as clauses.

@weswigham weswigham merged commit 203a5ce into microsoft:master Jan 27, 2021
@weswigham weswigham deleted the include-modifier-index-props branch January 27, 2021 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Using keyof with key remapping to exclude index signatures doesn't return known keys
4 participants