typescript-json-schema
typescript-json-schema copied to clipboard
Recursion Results in "Maximum call stack size exceeded"
Even though there are many closed tickets regarding this problem, recursion still ends up in Maximum call stack size exceeded.
Simple to reproduce, create file recurse.tsx:
export type Recurse = {
recurse: Recurse
}
Run:
$ npx typescript-json-validator recurse.tsx Recurse
Maximum call stack size exceeded
$ npx typescript-json-validator --version
2.4.2
If you can, I would suggest using https://github.com/vega/ts-json-schema-generator since it handles recursion better.