Skip to content

Commit 41a7726

Browse files
committed
Merge branch 'main' into new-docs
2 parents 769bfb9 + 950b6fa commit 41a7726

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

.changeset/soft-swans-heal.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"robot3": patch
3+
---
4+
5+
Fix syntax error in state function type definition that caused TypeScript compilation failures. The previous change had a missing space in a conditional type expression, breaking type inference for state transitions.

package-lock.json

Lines changed: 0 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ declare module 'robot3' {
5858
*
5959
* @param args - Any argument needs to be of type Transition or Immediate.
6060
*/
61-
export function state<T extends (Transition<any> | Immediate<any>)[]>(
62-
...args: T
63-
): MachineState<T[number] extends (Transition<infer F>)? F : string>;
61+
export function state<T extends Transition<any> | Immediate<any>>(
62+
...args: T[]
63+
): MachineState<T extends Transition<infer F> ? F : string>;
6464

6565
/**
6666
* A `transition` function is used to move from one state to another.

0 commit comments

Comments
 (0)