- Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
FixedA PR has been merged for this issueA PR has been merged for this issueSuggestionAn idea for TypeScriptAn idea for TypeScript
Description
Personally, I like the look (and simplicity) of ECMA6 / TypeScript without semi-colons. The only problem is that there are some known danger-zones with automatic semi-colon insertion. Could we have compiler warnings to prevent these from slipping through the cracks?
Example:
function dangerous(): string { return "watch the semi-colons!" } dangerous()
Compiles to the following with no warnings or compiler errors (even though the function actually doesn't return a string):
function dangerous() { return; "watch the semi-colons!"; } dangerous();
This specific case is kind of scary / annoying, but it might be worth looking into others.
Thoughts?
mnpenner
Metadata
Metadata
Assignees
Labels
FixedA PR has been merged for this issueA PR has been merged for this issueSuggestionAn idea for TypeScriptAn idea for TypeScript