feat(v2): allow for Typescript pages and components #2221
Merged
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.
Motivation
Most of our codebase is in Typescript. We want some dynamic documentation to where we can reference variables in Typescript files. It would be awesome to further support inline Typescript files as well.
This is a very simple change that enables a lot of possibilities.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Pretty straight forward!
.ts
file in the pages folder (and a.js
file for backwards compatibility) and test it compiles.ts
or a.tsx
file somewhere in the project, then reference it in any.md
or.mdx
file and be amazed as it worksRelated PRs
Let me know how we want this documented (a page or a footnote) and I'll add it to the PR.
Fixes #2120