Skip to content

Commit

Permalink
docs: Update the docParser to prevent max call stack errors [skip rel…
Browse files Browse the repository at this point in the history
…ease] (#2342)

Sometimes the doc parser throws an `Maximum call stack exceeded" error. This happens when a type is self-referential, but not exported. Example:

```ts
type NestedType = string | number | { foo: NestedType }
```

If `NestedType` is referenced by an exported type, the doc parser will get into a recursive loop. This change adds symbol tracking per export to detect this case and will bail considering `NestedType` to be exported.

[category:Documentation]
  • Loading branch information
NicholasBoll authored Sep 25, 2023
1 parent bc7ee75 commit 5ea37a8
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 84 deletions.
Loading

0 comments on commit 5ea37a8

Please sign in to comment.