One needs to define their types as a const, like this one:
``` [{ type: Number, name: "field1" }, { type: String, name: "field2" }] as const ```
and then use Typescript magic to convert it into the fully fledged Typescript type.
Yes, it's annoying, but it's more flexible.
One needs to define their types as a const, like this one:
``` [{ type: Number, name: "field1" }, { type: String, name: "field2" }] as const ```
and then use Typescript magic to convert it into the fully fledged Typescript type.
Yes, it's annoying, but it's more flexible.