If you reference an enum from an array or a hash, the enum body gets exported inline which is invalid in Typescript.
Example:
module Types
include Dry.Types()
extend Dry::Typescript
ts_export MyHash = Types::Hash.schema(enum: Types::String.enum('a', 'b'))
end
This will be exported as:
export type MyHash = {
enum: A = "a"
B = "b"
}
In use cases where the enum is defined inline as above, we will likely need to come up with an auto-generated name for it during export.
If you reference an enum from an array or a hash, the enum body gets exported inline which is invalid in Typescript.
Example:
This will be exported as:
In use cases where the enum is defined inline as above, we will likely need to come up with an auto-generated name for it during export.