Skip to content

Automatically add aliases on exported types #13

@demsullivan

Description

@demsullivan

It would be such a great user experience if aliases didn't need to be manually set using .ts_alias on the type.

Ideally, this:

module Types
  include Dry.Types()
  extend Dry::Typescript

  ts_export UUID = Types::String
  ts_export Email = Types::String
  ts_export User = Types::Hash.schema(id: UUID, email: Email)
end

... should export:

export type UUID = string;
export type Email = string;
export type User = {
  id: UUID
  email: Email
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions