Skip to content

Commit ddf1261

Browse files
committed
feat: improve types
1 parent 48e47e0 commit ddf1261

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/automation/src/lib/state-machine.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ export class StateMachine {
366366
toState,
367367
};
368368

369+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Listeners can be any type
369370
const listeners: Listener<any>[] = [];
370371
const checks: CheckFn[] = [];
371372

packages/automation/src/lib/transitions/transition.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ type Values = (unknown | undefined)[];
77

88
export interface BaseTransitionParams {
99
debug?: boolean;
10-
listeners?: Listener<any>[]; // should be unknown but that demands callers to cast listeners to their correct type
10+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Listeners can be any type
11+
listeners?: Listener<any>[];
1112
check?: CheckFn;
1213
onMatch: resultFn;
1314
onMismatch?: resultFn;

0 commit comments

Comments
 (0)