Skip to content

Commit c197cab

Browse files
committed
fix internal types
1 parent 8b35639 commit c197cab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/atom/src/internal/registry.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const make = (options?: {
3131

3232
const SerializableTypeId: Atom.SerializableTypeId = "~effect-atom/atom/Atom/Serializable"
3333
const atomKey = <A>(atom: Atom.Atom<A>): Atom.Atom<A> | string =>
34-
SerializableTypeId in atom ? (atom as Atom.Serializable)[SerializableTypeId].key : atom
34+
SerializableTypeId in atom ? (atom as Atom.Serializable<any>)[SerializableTypeId].key : atom
3535

3636
class RegistryImpl implements Registry.Registry {
3737
readonly [TypeId]: Registry.TypeId
@@ -134,7 +134,7 @@ class RegistryImpl implements Registry.Registry {
134134
if (typeof key === "string" && this.preloadedSerializable.has(key)) {
135135
const encoded = this.preloadedSerializable.get(key)
136136
this.preloadedSerializable.delete(key)
137-
const decoded = (atom as any as Atom.Serializable)[SerializableTypeId].decode(encoded)
137+
const decoded = (atom as any as Atom.Serializable<any>)[SerializableTypeId].decode(encoded)
138138
node.setValue(decoded)
139139
}
140140
return node

0 commit comments

Comments
 (0)