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
Maybe it's unknown now?
Need to ask David tho
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 workI wonder if there should be unknown.any and unknown.NonNullable (aka {})
cc @ArkDavid
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 runtimeHot take 😅
unknown.any
will be in the next release