You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@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 interfaces and types, I don't think those have a JS equivalent anyways so they should be ignored.
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.
timbuckley
changed the title
TODO: Documentation should have a user option to display either TypeScript or JavaScript
Request: Documentation should have a user option to display either TypeScript or JavaScript
Aug 3, 2022
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: