Skip to content

Allow to accept void types in callbacks #2061

Closed
@MaxGraey

Description

@MaxGraey

Currently this doesn't work:

function boo(): void {}
function foo(fn: () => void): void {
  return fn();  // this should be allowed
}
foo(() => boo()); // this should be allowed

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions