Open TomokiMiyauci opened 1 year ago
Currently, empty forms are generated as any type.
any
In TypeScript, there are few situations where the any type is more suitable than the unknown type.
unknown
Both are tolerant of assignments. unknown is more type-safe than any because it is strictly for reference.
I think the unknown type is better suited for the role of a code generator.
As a work around to the above, you could do something like the following to explicitly output an unknown type:
{ "data": { "metadata": { "typescriptType": "unknown" } } }
Currently, empty forms are generated as
any
type.In TypeScript, there are few situations where the
any
type is more suitable than theunknown
type.Both are tolerant of assignments.
unknown
is more type-safe thanany
because it is strictly for reference.I think the
unknown
type is better suited for the role of a code generator.