Skip to content

noImplicitReturns compile error for void functions as of 1.8.0-dev.20151126 #5814

Closed
@myitcv

Description

@myitcv

As of 1.8.0-dev.20151126 the following now generates a compile error when noImplicitReturns is specified in tsconfig.json:

let x = () => { console.log("Test"); }
Not all code paths return a value.

even though the type of x is () => void

This feels like a bug to me...

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions