-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Request: Documentation should have a user option to display either TypeScript or JavaScript #3895
Comments
@timbuckley I'd like to tackle this, however I'd like to clarify something. Some snippets only include things like interfaces or types, which don't directly translate back to JS. How should that be represented when toggled to JS, or should that not be an option for these kinds of snippets? |
@Walsker @timbuckley I wonder if the right approach is to use the TypeScript to generate the JavaScript. I don't know if the JavaScript will appear natural, but I feel like it's worth a try. Then we don't have to keep two separate code bases (one in TS and one in JS) in sync. With respect to |
@thesunny @ianstormtaylor is it still a good first issue? I would like to hop in and take this issue. |
@RavenColEvol feels like a good first issue to me! Since it affects documentation and not Slate itself, it is simultaneously easy to confirm that it works (does the code look right) and also shouldn't introduce any issues into Slate. |
Do you want to request a feature or report a bug?
Request
What's the current behavior?
Currently there is no way to toggle between JS and TS examples on the documentation (example), it only shows TS examples.
What's the expected behavior?
User should see a toggle above each example (or at the top of all pages) to see a TS or JS version of example usage.
The text was updated successfully, but these errors were encountered: