1.2.1 • Published 4 years ago

asl-types v1.2.1

Weekly downloads
180
License
MIT
Repository
github
Last release
4 years ago

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.