Was `any` removed?

I used to be able to do: type("any");. Now it's throwing error Argument of type '"any"' is not assignable to parameter of type '"'any' is unresolvable "'
6 Replies
Dimava
Dimava4mo ago
Maybe it's unknown now? Need to ask David tho
SynthLuvr
SynthLuvrOP4mo ago
unknown works but it's fundamentally different I could cast it, it's not a big deal, but wondering Mostly I would use this when I'm expecting a certain sized tuple and know/care about some of the properties like type(["number", "string", "any", "number"]) etc. replacing any with unknown does work
Dimava
Dimava4mo ago
I wonder if there should be unknown.any and unknown.NonNullable (aka {}) cc @ArkDavid
ssalbdivad
ssalbdivad4mo ago
Yeah I did remove it unknown.any is not a bad idea I just didn't want it to be a top-level type because it's a lie It is just unknown under the hood but you can abuse it and add constraints that would crash at runtime
PIat
PIat4mo ago
Hot take 😅
ssalbdivad
ssalbdivad4mo ago
unknown.any will be in the next release
Want results from more Discord servers?
Add your server