jason810496 opened a new pull request, #73875:
URL: https://github.com/apache/airflow/pull/73875
- **Docs preview for feedback**: describes the TypeScript SDK as it will be
once the native Dag stack (#73437 to #73446) and native Dag parsing (#73848)
land, so the interface can be reviewed before it ships.
- **Do not merge** before those land.
## Why
Declaring a Dag in TypeScript is spread over ten open PRs, and each updates
the guide a little. The end state in one readable place is the easiest thing to
give feedback on.
## What
- `typescript.rst` is reorganized around the two ways to use the SDK:
declaring a whole Dag in TypeScript, and implementing the tasks of a Python
Dag. It covers task inputs, task ids, options, order-only dependencies, task
groups, `dag.if`, `dag.switch`, `dag.triggerDagRun`, and deploying a bundle
into a Dag bundle.
- The README, the API reference landing page and the example README follow
the same shape.
- The language SDK overview no longer says Dags are always defined in Python.
```ts
import { Bundle, Dag } from "apache-airflow-ts-sdk";
const dag = new Dag("ts_etl", { schedule: "@daily", queue: "typescript" });
const extract = dag.task("extract", async (): Promise<number> => 42);
const load = dag.task("load", async ({ rows }: { rows: number }) => {});
load({ rows: extract() });
await new Bundle(dag).serve();
```
The README's compatibility matrix is generated from `capabilities.yaml` and
is left alone; it changes with the implementing PRs.
---
##### Was generative AI tooling used to co-author this PR?
- [x] Yes, with help of Claude Code Opus 5.5 following [the
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]