Full JavaScript/TypeScript Support in Quarto #10719
dereckmezquita
started this conversation in
Feature Requests
Replies: 3 comments 3 replies
This comment has been hidden.
This comment has been hidden.
-
You could possibly contribute such engine to Quarto. |
Beta Was this translation helpful? Give feedback.
2 replies
-
I would love this. Using javascript in Quarto is a pain and has made me consider other publishing frameworks |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I'd like to propose adding comprehensive support for JavaScript and TypeScript as first-class languages within Quarto, similar to the current support for R and Python. This feature would allow users to leverage JS/TS as powerful tools for data analysis, visualisation, and general-purpose programming within Quarto documents.
Key Features
Use Cases and Examples
Here are some examples to illustrate the potential of this feature:
Implementation Considerations
Handling Asynchronous JavaScript
One of the anticipated obstacles to overcome is the asynchronous nature of JavaScript. Unlike R or Python, which typically execute in a top-down manner, JavaScript often relies on asynchronous operations. To provide a more familiar experience for users, we could implement a solution that allows for a more linear execution flow. Some potential approaches include:
Here's an example of how this might look in practice:
Rationale
This feature would significantly enhance Quarto's capabilities, allowing users to leverage the vast JavaScript ecosystem for data science, web development, and general-purpose programming tasks. It would provide a seamless experience for developers familiar with JS/TS, enabling them to use these languages alongside R and Python in literate programming documents. The addition of D3.js support would particularly enhance the data visualisation capabilities within Quarto.
Discussion
I'd appreciate insights into Quarto's internal architecture, particularly regarding language engine implementation. How does Quarto currently handle different language engines, and what would be involved in adding full JS/TS support?
Differences from Existing Solutions
Advantages of Full Local Runtime Support
While Observable JS offers unique and powerful features, particularly for interactive data exploration, this proposal aims to provide a complementary solution that caters to different use cases and developer preferences. The goal is to expand Quarto's capabilities to fully embrace JavaScript and TypeScript as first-class citizens in the ecosystem, alongside R and Python.
I'm open to discussing this feature further and potentially contributing to its implementation if there's interest from the Quarto team. I believe this addition would significantly enhance Quarto's appeal to a broader range of developers and data scientists, particularly those deeply invested in the JavaScript ecosystem.
Beta Was this translation helpful? Give feedback.
All reactions