Skip to content

Type alias support #71

Open
Open
@snorkysnark

Description

@snorkysnark

For type aliases, one can either use the 3.12 syntax:

type Resolves[T] = T | OutputOf

which results in an error: WARNING: ralsei.graph.outputof: ralsei.graph.outputof: 'Resolves' is unknown [autodoc2.all_resolve]

or the older

Resolves: TypeAlias = T | OutputOf

which works but obscures the value: ralsei.graph.outputof.Resolves : TypeAlias = None

So there isn't a good way to document type aliases and what they refer to.
Sure you can replace them with autodoc2_replace_annotations, but I'd like the user to know what aliases exist as part of my API

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