-
Notifications
You must be signed in to change notification settings - Fork 724
Create a Tab
on docusaurus for Typescript implementations
#696
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
Comments
Hi @pedroapfilho, thanks for opening this! |
Seems to make sense to me if anyone's willing to do the work there. |
Alright, I'll start then! |
Would it be possible to have the TypeScript code typechecked and compiled to the JavaScript code automatically to keep the types and both code examples in sync? |
I'd be worried about the compiled version looking like.... compiled code 😅 But it's possible that the right babel plugins + prettier could be used to only remove types 🤔 |
As far as I understand that's pretty much what |
@nickmccurdy Do you have any examples of it somewhere I can see? |
Examples of what? |
Of any docusaurus docs that has this setup |
I came across the
Setup
on theReact
docs, and I found this.Using it with typescript is a little bit tricky for new comers, and I think that it may happen with a lot of people, so what if we use the new Markdown Feature for
Docusaurus
that allows us to createTabs
on the docs that are for JS, and use:So we could have more people using it right with `Typescript.
Is it a good idea? I can implement it here at first, and then we take it as a default and implement it everywhere else, whenever we touch it.
Material-UI
did it on their docs, and I find it so much better to use it like this. Idk if they useDocusaurus
, but it's easily implementable..`The text was updated successfully, but these errors were encountered: