Define a component and run it as a plain function.
Level: Basics · Concept: Components
flowchart LR
input(["'hello, astack'"]) --> U[Uppercase.run] --> output(["'HELLO, ASTACK'"])
- A component extends
Componentand overridesrun(). run()is standalone mode. The same class also works inside a pipeline, as the next example shows.
# Once, from the repository root
pnpm install && pnpm build
pnpm --filter @astack-examples/component startThe full program is index.ts.
Next: Pipeline