Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
"node": true,
"jest": true
},
"extends": "eslint:recommended",
"parser": "babel-eslint",
"plugins": [
"json",
"unicorn",
"prettier"
],
"parserOptions": {
"ecmaVersion": 11
},
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,15 @@ PR's are welcome to help finish the ones below :)
- [ ] Typescript typings
- [ ] Run via CLI
- [ ] Remove the "experimental" label on retry and catch
- [ ] Support for timeoutseconds/timeoutsecondspath/heartbeatseconds/heartbeatsecondspath
- [ ] More accurate timing mechanism
- [ ] use `jest.fakeTimers()` in the test
- [ ] Walk through states ala "generator" style. e.g, `yield sm.next()`
- [ ] Support for Arrays in OutputPath `$.a[0,1]` to `[1,2]`

## Changelog

Implemented august 2020 update https://states-language.net/spec.html

## License

Expand Down
30 changes: 30 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
export interface State {
Type: string;
Resource: string;
ItemsPath?: any;
ResultPath?: any;
ResultSelector?: any;
OutputPath?: any;
Next?: any;
End?: any;
Retry?: any;
MaxAttempts?: any;
}

type opts = {
Name: string;
StateMachine: StateMachine;
Resources: any;
respectTime: boolean;
maxWaitTime: number;
maxConcurrency: number;
}

interface StateMachine {
StartAt: string;
States: States
}

interface States {
[key: string]: State[];
}
Loading