Skip to content

Incorrect emits with function return type declarations #11295

@falsandtru

Description

@falsandtru

TypeScript Version: master

Code

$ node built/local/tsc.js -t es5 -m amd --moduleResolution node --lib es6 index.ts

function f(): undefined {
  return;
}

Expected behavior:

function f() {
    return;
}

Actual behavior:

function f():  {
    return;
}

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issueHigh Priority

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions