Skip to content

Commit

Permalink
fix: fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
abrgr committed Sep 30, 2023
1 parent da5daa3 commit f370188
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/rt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ export const spawn = (
instanceDescriptor: PersistentInstanceDescriptor,
opts?: SpawnOptions
): PersistentActorRef => {
if (typeof globalThis?.__statebaked_rt?.spawn === "function") {
return globalThis.__statebaked_rt.spawn(instanceDescriptor, opts);
if (typeof (globalThis as any)?.__statebaked_rt?.spawn === "function") {

Check warning on line 67 in src/rt.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected any. Specify a different type
return (globalThis as any).__statebaked_rt.spawn(instanceDescriptor, opts);

Check warning on line 68 in src/rt.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected any. Specify a different type
}

return {
...instanceDescriptor,
type: "statebacked.instance",
id: opts.name ?? crypto.randomUUID(),
id: opts?.name ?? crypto.randomUUID(),
machineInstanceName:
instanceDescriptor.machineInstanceName ?? crypto.randomUUID(),
};
Expand Down

0 comments on commit f370188

Please sign in to comment.