Skip to content

Support return type assertions for steps #60

@acuarica

Description

@acuarica

When enabling type assertions in steps, e.g.

type Top<E extends Expr> = State<Inst, Expr> &{stack: {top: E}};

    CREATE: [0xf0, function create(state: State<Inst, Expr>): asserts state is Top<Create> {
    // [...]
    }

their usage step.CREATE(state); raises the following error

Assertions require every name in the call target to be declared with an explicit type annotation. ts(2775)

It may seem related to

But not sure which name missing an explicit type annotation is referring to.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions