Skip to content

Commit

Permalink
fix: context type
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelOsborne committed Aug 7, 2023
1 parent 288bbcd commit b835e6e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/green-coats-kneel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@dotlottie/dotlottie-js": patch
---

context type
1 change: 1 addition & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"four-plums-obey",
"friendly-windows-rush",
"great-actors-arrive",
"green-coats-kneel",
"green-comics-guess",
"large-years-shop",
"late-shirts-mix",
Expand Down
6 changes: 6 additions & 0 deletions packages/dotlottie-js/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @dotlottie/dotlottie-js

## 0.4.0-beta.20

### Patch Changes

- context type

## 0.4.0-beta.19

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/dotlottie-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dotlottie/dotlottie-js",
"version": "0.4.0-beta.19",
"version": "0.4.0-beta.20",
"type": "module",
"description": "This library helps in creating and modifying .lottie files.",
"repository": {
Expand Down
12 changes: 6 additions & 6 deletions packages/dotlottie-js/src/common/dotlottie-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ export interface XState {
// [key: string]: number;
// }

export interface XStateMachineAction {
incrementCounter: (context: Record<string, any> | undefined) => void;
}
// export interface XStateMachineAction {
// incrementCounter: (context: Record<string, any> | undefined) => void;
// }

export interface XStateMachine {
actions: XStateMachineAction;
context: XStateMachine | undefined;
guards: Record<string, unknown>;
actions: { incrementCounter: (context: unknown) => void };
context: { counter: number };
guards: { checkCounter: (context: unknown) => boolean };
id: string;
initial: string;
states: Record<string, XState>;
Expand Down

0 comments on commit b835e6e

Please sign in to comment.