-
Notifications
You must be signed in to change notification settings - Fork 13k
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
TypeScript Version: 2.4.2
Code
Object.freeze({
foo() {
return Object.freeze('a');
},
});
(with --strict
)
Expected behavior:
Accepted in 2.3 and 2.4.
Actual behavior:
In 2.4: 'foo' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.
Note that the TS playground currently is 2.3.3, so you can't reproduce this on there.
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