You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also, could enable lots of super nice helper functions
typeFirst<T>=Textends[infer U, ...any[]] ? U : never;typeDropFirst<T>=Textends[any, ...infer U] ? U : never;typeLast<T>=Textends[...any[], infer U] ? U : never;
What about things in the "middle"?
Could beef up inference a bit
Do labels slice and dice correctly?
The intent is that they should, some technicalities that make it not work right.
One of the use-cases was curry - take a function of a parameter list of some length, return a function that takes the first and returns a function that takes the rest.
Variadic Types and Variadic Tuples
#5453
[FixedTypes, OptionalTypes?, ...OneRestType[]][number, ...string[], boolean[number, ...[string, boolean], number]Yes!
And if you feed in a union, it distributes
Example: what do you infer to
[...T, ...U]?If you can do it "right", you can type
Function.prototype.bindmore simply.Also, could enable lots of super nice helper functions
What about things in the "middle"?
curry- take a function of a parameter list of some length, return a function that takes the first and returns a function that takes the rest.Zip@weswigham shows me it's possible
Node Factory
#35282
#38604
NodeFactorys between different versions?awaitcan't be done with ambiguous parsing contexts (i.e. script .js vs module .mjs).Pedantic Modes
https://gist.github.com/RyanCavanaugh/f80f9ddc50d45c4d76e7c4101efada28
undefinedin indexed access types (currently too annoying)overridekeyword in classes (useless withoutnoImplicitOverrideor something)--pedantic?my-super-kewl-typscript-pedantic?pedanticYaddaYadda?strictand which is not.