-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
Below should give me an error:
class A {
a(): string | null {
if (Math.random() > 0.5) {
return '';
}
// it does error here as expected
}
}
class A {
get a(): string | null {
if (Math.random() > 0.5) {
return '';
}
// it should error here because it returns undefined
}
}
tsc -v
Version 2.1.0-dev.20160713
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue