NBTify Anvil Parsing + Types
Quick question, what's the point of declaring fields with quotes around enum type like
type MyType = {
resource: `${DimensionResource}`
}
instead of just
type MyType = {
resource: DimensionResource
}
?
I use an enum to define the types for resource IDs in a single place, and if the enum is declared plainly as the type itself, then it won't let you get autocompletion for the string values themselves, which is the approach I like to have out of the box, in terms of editor UX. It does still let you put in those plain strings without needing to reference them from the enum as a key itself, but I want it to get that nice autocomplete that shows plain strings as an option as well.
tldr: It makes the enum's values appear like a union of strings when using editor autocomplete.