Uh oh!
There was an error while loading. Please reload this page.
fixed types for Object.values and Object.entries - #58358
Conversation
Jake Bailey (jakebailey)
commented
Apr 29, 2024
TypeScript Bot (@typescript-bot) test it |
TypeScript Bot (typescript-bot)
commented
Apr 29, 2024
Hey Jake Bailey (@jakebailey), the results of running the DT tests are ready. Everything looks the same! |
TypeScript Bot (typescript-bot)
commented
Apr 29, 2024
Jake Bailey (@jakebailey) Here are the results of running the user tests comparing Everything looks good! |
TypeScript Bot (typescript-bot)
commented
Apr 29, 2024
Jake Bailey (@jakebailey) Here they are:tscComparison Report - baseline..pr
System info unknown Hosts
Scenarios
Developer Information: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
TypeScript Bot (typescript-bot)
commented
Apr 29, 2024
Jake Bailey (@jakebailey) Here are the results of running the top 400 repos comparing Everything looks good! |
typeholes
commented
Apr 30, 2024
Once #58372 🙂 lands the overload should probably be replaced by a simple union. |
typeholes
commented
Apr 30, 2024
fixes #58376 |
Does this also need some sort of handling for objects with |
typeholes
commented
Apr 30, 2024
There is already an overload for |
Thanks, I didn't look beyond the context of the diff :) Locally I use something like this: typeKeyToString<Kextendsnumber|string|symbol>=Kextendsstring ? K : Kextendsnumber ? `${K}` : never;keys<Kextendsnumber|string|symbol,V>(o: Record<K,V>): KeyToString<K>[];entries<Kextendsnumber|string|symbol,V>(o: Record<K,V>): [KeyToString<K>,V][];values<Kextendsnumber|string|symbol,V>(o: Record<K,V>): V[];but aside from being too complex for the standard library, that probably opens up a whole can of worms if applied to everything (works well for my code though!). |
Fixes#26010