-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Omit producing "JavaScript heap out of memory" with v3.3 #30068
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Just curious. If you run If it does complete, what does it say for |
I can't seem to repro this on |
@weswigham Thanks a lot for the prompt reply. I have debugged this issue to discover that my initial thought regarding Produces OOM during compilation: import React, {PureComponent} from 'react';
interface TextProps {
tag: keyof JSX.IntrinsicElements;
}
export class Text extends PureComponent<TextProps> {
render() {
const {
tag: Tag,
children
} = this.props;
return (
<Tag ref={()=>{/* oops */}}>
{children}
</Tag>
);
}
} |
Oho? Maybe related to #29949 then. |
@weswigham Looking at #29949 and even disabling |
Yep, this looks like a carbon copy of how #29949 works - the @ahejlsberg what do you think we should do for a intersection/union nesting where flattening the nesting would produce an absurd number of types? There's a strong desire to check this pattern correctly, so I don't think some kind of resource limit would work here; but at the same time, optimizing construction won't cut it here - the sheer number of types scheduled to be produced by this flattening operation is huge (and since there's a pair of object types, it doesn't simplify nicely at all). |
TypeScript Version: 3.4.0-dev.201xxxxx
Search Terms:
Omit
Code
Expected behavior:
It should work as early versions, last tested v3.2.4
Actual behavior:
Compiler throws "JavaScript heap out of memory" and same happens with VSCode Intellisense (stuck for minutes without proper answer).
Playground Link:
Tested code working with playground 3.3. (pasting @types/react at bottom), too big to share.
Related Issues:
The text was updated successfully, but these errors were encountered: