Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Continues off an idea we had last year where it would be cool to have a package that we could use to parse type information automatically.
This is currently a WIP but wanted to get something up in case people wanted to collaborate on it 👀 A lot of the support for primitives is there and the active work now is on understanding references and how we would like to serialize that to be used in docs. Specifically, a reference is when we have things like
React.ComponentPropsWithoutRef
.One thing that I'm having trouble with is when to use
ts.Type
versusts.TypeNode
. It seems like when trying to extract type information fromts.Type
, we are getting access to an underlying type instead of being able to trace the references. For example:In the case above,
T2
would just give usArray<number>
but we would like to keep track of all references for better support in the documentation site.