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

assertions in return statements and in void operations aren't stripped #47

Open
RebeccaStevens opened this issue Jun 20, 2023 · 0 comments

Comments

@RebeccaStevens
Copy link

The following should be transformed from:

export function assertNever(msg = "never reached") {
  return void assert(false, msg);
}

to:

export function assertNever(msg = "never reached") {
  return void undefined;
}

But the presence of with void or return stops this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant