ts2asl is a TypeScript-to-AWS State Language (ASL) transpiler that converts TypeScript code into Amazon States Language JSON, enabling developers to author AWS Step Functions using standard TypeScript syntax. Version 0.1.0 is the initial release with a focus on a subset of TypeScript features, including variables, conditionals, loops, and async/await. It targets Node >=12.0.0 and ships TypeScript types. Key differentiators vs direct ASL authoring: static type checking, IDE support, and the ability to use familiar programming constructs. Current limitations include no support for classes, enums, or complex generics. Release cadence is not yet established as it is a young project.
npm install ts2aslNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Converts a simple TypeScript async function into AWS Step Functions ASL format using compile().
Refactor code to use only functions, variables, conditionals, loops, and async/await.
Check the supported features list: https://github.com/Stedi/ts2asl#supported-features
Ensure 'type': 'module' is set in your package.json.
Stay tuned for future versions.
Run 'npm install ts2asl' and ensure 'type':'module' in package.json.
Use 'import { compile } from 'ts2asl'' instead of 'require'.Set 'type':'module' in package.json or use .mjs extension.
Replace class with functions and objects.
No dependency data recorded yet.