Uh oh!
There was an error while loading. Please reload this page.
Add NoInfer intrinsic type - #52968
Conversation
TypeScript Bot (typescript-bot)
commented
Feb 25, 2023
The TypeScript team hasn't accepted the linked issue #14829. If you can get it accepted, this PR will have a better chance of being reviewed. |
Uh oh!
There was an error while loading. Please reload this page.
Nathan Shively-Sanders (sandersn)
commented
Mar 7, 2023
Mateusz Burzyński (@Andarist) did you learn anything interesting from the implementation? If so, can you add a report to the end of #14829? Unless Daniel Rosenwasser (@DanielRosenwasser)Ryan Cavanaugh (@RyanCavanaugh) or Anders Hejlsberg (@ahejlsberg) are interested in taking up this feature in a design meeting, it's likely that this PR will sit until it gets stale. |
Mateusz Burzyński (Andarist)
commented
Mar 13, 2023
Jake Bailey (@jakebailey) would you mind creating a playground for this? :) |
Jake Bailey (jakebailey)
commented
Mar 13, 2023
TypeScript Bot (@typescript-bot) pack this |
Heya Jake Bailey (@jakebailey), I've started to run the tarball bundle task on this PR at 86448ff. You can monitor the build here. |
Hey Jake Bailey (@jakebailey), I've packed this into an installable tgz. You can install it for testing by referencing it in your and then running There is also a playground for this build and an npm module you can use via |
Homa Wong (unional)
commented
May 1, 2023
Hi, I am reading #14829 and trying to add An I notice the type typeNoInfer<T>=T&{[KinkeyofT]: T[K]}typeRecursivePartial<T>={[PinkeyofT]?: T[P]extends(infer U)[]
? RecursivePartial<U>[]
: T[P]extendsRecord<any,any>
? RecursivePartial<T[P]>
: T[P]}functionfoo(v: {a: number,b: string}){}functionstub<T>(v: RecursivePartial<NoInfer<T>>): T{returnvasT}foo(stub({a: 1})// error// Argument of type '{ a: number; }' is not assignable to parameter of type '{ a: number; b: string; }'.// Property 'b' is missing in type '{ a: number; }' but required in type '{ a: number; b: string; }'.It works with the following type: Just want to bring it up so that this test case is covered in your implementation. |
Mateusz Burzyński (Andarist)
commented
Jun 5, 2023
Ryan Cavanaugh (@RyanCavanaugh) Since 5.2 development has started recently - perhaps we could get some current thoughts from the team about this feature? 😉 |
Andrew Branch (andrewbranch)
commented
Dec 7, 2023
TypeScript Bot (@typescript-bot) pack this |
TypeScript Bot (typescript-bot)
commented
Dec 7, 2023
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 Daniel Rosenwasser (@DanielRosenwasser) and Ryan Cavanaugh (@RyanCavanaugh) are aware of the changes, just as a heads up. |
Heya Andrew Branch (@andrewbranch), I've started to run the tarball bundle task on this PR at 989fa50. You can monitor the build here. |
Hey Andrew Branch (@andrewbranch), I've packed this into an installable tgz. You can install it for testing by referencing it in your and then running There is also a playground for this build and an npm module you can use via |
Mateusz Burzyński (Andarist)
commented
Dec 15, 2023
superseded by #56794 |
closes#14829
There is still some work to be done here (type displays on hover, assignability bug, and maybe more) - but I'm pushing this out to receive an early feedback
cc Ryan Cavanaugh (@RyanCavanaugh)