asl-types
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

asl-types

asl-types is a TypeScript types module that makes it easier to create AWS Step Functions JSON (Amazon States Language).

Screenshot

Usage

npm install asl-types --save
import * as asl from 'asl-types'
 
const sm: asl.StateMachine = {
   ...
}
 
...
 
const stepFunctionJson = JSON.stringify(sm)

About

This module does very little! It generates TypeScript definitions using the following great projects.

asl-types makes some minor modifications to the JSON Schema to get the best results currently possible. See convert.ts for details.

Contributions

  • This is a set of interfaces right now. It might be useful to create a set of classes from these types.
  • Validation of cardinality rules, particularly for Choice states, are not as strict as we would like. This relates to an issue in json-schema-to-typescript (#96). Contributions to address this issue are really welcome. This could be a resolution to that issue or an alternative solution in asl-types. See the issue description for details and possible workarounds.

LICENSE

MIT

Copyright (c) 2019 fourTheorem Ltd.

Package Sidebar

Install

npm i asl-types

Weekly Downloads

1,925

Version

1.2.1

License

MIT

Unpacked Size

165 kB

Total Files

31

Last publish

Collaborators

  • eoinsha