Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support return type assertions for steps #60

Open
acuarica opened this issue Dec 30, 2023 · 0 comments
Open

Support return type assertions for steps #60

acuarica opened this issue Dec 30, 2023 · 0 comments
Labels
feature New feature or request

Comments

@acuarica
Copy link
Owner

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.

@acuarica acuarica added the feature New feature or request label Jan 18, 2024
@acuarica acuarica added this to the Stage 3 milestone Jan 18, 2024
@acuarica acuarica removed this from the Stage 3 milestone Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant