Skip to content

--strictNullChecks doesn't recongnize error that throw from nested method #9664

Closed
@xujihui1985

Description

@xujihui1985

TypeScript Version: 1.8.0 / nightly (2.0.0-dev.201xxxxx)
2.0.0
Code

// A *self-contained* demonstration of the problem follows...
with --strictNullChecks options, 
always complain `function lack ending return`, I throw the error in another method instead of throw it right awary. doesn't recongnize method that throw error in another method.

image

image

Expected behavior:
should compile success
Actual behavior:
can not be compiled

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions