Skip to content

Commit d047a8b

Browse files
committed
fix initial completions, don't know why it works now :P
1 parent cf08db3 commit d047a8b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ export namespace Machine {
5353
, "please add `on: {}` to state nodes that only have an `effect` property. "
5454
, "See the documentation to learn more."
5555
]> :
56-
[keyof A.Get<Self, "states">] extends [never]
57-
? A.CustomError<"Error: no states defined", A.Get<Self, "initial">>
58-
: keyof A.Get<Self, "states">
56+
[keyof A.Get<Self, "states", {}>] extends [never]
57+
? A.CustomError<"Error: no states defined", A.Get<Self, "initial", never>>
58+
: keyof A.Get<Self, "states", {}>
5959
, states:
6060
{ [StateIdentifier in keyof A.Get<Self, "states">]:
6161
StateIdentifier extends A.String

test/types.twoslash-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe("Machine.Definition", () => {
3030
})
3131
})
3232

33-
it.skip("shows child state identifiers as completions", () => {
33+
it("shows child state identifiers as completions", () => {
3434
useStateMachine({
3535
// @ts-expect-error
3636
initial: " ",

0 commit comments

Comments
 (0)