Skip to content
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

"Maximum call stack size exceeded" when type references itself #7

Open
gheja opened this issue Sep 8, 2020 · 0 comments
Open

"Maximum call stack size exceeded" when type references itself #7

gheja opened this issue Sep 8, 2020 · 0 comments

Comments

@gheja
Copy link
Contributor

gheja commented Sep 8, 2020

type tSomeType = {
        value: number,
        parent: tSomeType
}

let a: tSomeType;

a.value = 42;

console.log(a);
/home/gheja/[...]/node_modules/typescript-closure-compiler/typescript.js:42929
            throw e;
            ^

RangeError: Maximum call stack size exceeded
    at Object.ts.getSourceTextOfNodeFromSourceFile (/home/gheja/[...]/node_modules/typescript-closure-compiler/typescript.js:5488:12)
    at Object.ts.getTextOfNode (/home/gheja/[...]/node_modules/typescript-closure-compiler/typescript.js:5504:15)
    at getPropertyKeValue (/home/gheja/[...]/node_modules/typescript-closure-compiler/typescript.js:38822:23)
    at /home/gheja/[...]/node_modules/typescript-closure-compiler/typescript.js:38688:38
    at Object.ts.forEach (/home/gheja/[...]/node_modules/typescript-closure-compiler/typescript.js:1645:26)
    at getTypeLiteral (/home/gheja/[...]/node_modules/typescript-closure-compiler/typescript.js:38683:20)
    at getParameterOrUnionTypeAnnotation (/home/gheja/[...]/node_modules/typescript-closure-compiler/typescript.js:38955:61)
    at getParameterOrUnionTypeAnnotation (/home/gheja/[...]/node_modules/typescript-closure-compiler/typescript.js:38919:32)
    at getParameterOrUnionTypeAnnotation (/home/gheja/[...]/node_modules/typescript-closure-compiler/typescript.js:38949:32)
    at getParameterOrUnionTypeAnnotation (/home/gheja/[...]/node_modules/typescript-closure-compiler/typescript.js:38919:32)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant