Skip to content

Function type literals are allowed to omit return type #654

@DanielRosenwasser

Description

@DanielRosenwasser
function f(x: ()) {
}

var g: (y: number);

We expect a syntax error, but instead

  • the parameter x has the type () => any
  • the variable g has the type (y: number) => any.

Metadata

Metadata

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions