sam-goodwin / punchcard

Type-safe AWS infrastructure.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rename any to unknown or dynamic?

sam-goodwin opened this issue · comments

commented

As asked in #41, should the any type be renamed to unknown or maybe even dynamic?

Maybe we want to support both Type<unknown> and Type<any> by having both?

from a type safe standpoint, would any be something we want? the dynamic sounds better IMHO, because any is just false, strictly speaking. dynamic gives the message of "I know what I'm doing, so make this type as this-type"

commented

Yeah I like the dynamic name also. I just released v0.7.0 with it named any :(

Any thoughts on supporting both any and unknown? We could have dynamic = Type<unknown> and any = Type<any>. Or even name any as unsafeDynamic?

oh, unsafeDynamic is a good, in-your-face one (for edge cases, really). somehow reminded me of dangerouslySetInnerHTML from react 😄