Skip to content

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

@RebeccaStevens

Description

@RebeccaStevens

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.

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