-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Closed
Labels
Needs ProposalThis issue needs a plan that clarifies the finer details of how it could be implemented.This issue needs a plan that clarifies the finer details of how it could be implemented.SuggestionAn idea for TypeScriptAn idea for TypeScript
Milestone
Description
TypeScript Version: 3.2 - 3.4.0-dev.20190213
Search Terms:
memory heap crash
Code
function createObj() {
return {
func1() {
return this;
},
func2() {
return this;
},
func3() {
return this;
},
func4() {
return this;
},
func5() {
return this;
},
func6() {
return this;
},
func7() {
return this;
},
func8() {
return this;
},
func9() {
return this;
}
};
}Expected behavior:
Run: tsc --noImplicitThis -d test.ts
No crash. There's no crash when there's only 8 functions, but the generated declaration file is 41 MB!
Actual behavior:
With 9 member functions tsc runs out of memory and crashes.
Playground Link:
Related Issues:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Needs ProposalThis issue needs a plan that clarifies the finer details of how it could be implemented.This issue needs a plan that clarifies the finer details of how it could be implemented.SuggestionAn idea for TypeScriptAn idea for TypeScript