Skip to content

Feature: Generate new types rather than type aliases #656

@corani

Description

@corani

Currently type aliases are being generated (e.g. type Status = string) rather than new types (e.g. type Status string). Both have their advantages and disadvantages: "new" types are more type-safe and allow defining methods on the types (which enables #657), but they require an explicit type cast when converting to their "base" type.

As this is a breaking change, it should probably be opt-in via a config option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions