Skip to content

Commit 7434d4e

Browse files
committed
improve types
1 parent 741cd85 commit 7434d4e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/hypergraph/src/entity/update.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { DocHandle } from '@automerge/automerge-repo';
22
import * as Schema from 'effect/Schema';
33
import { decodeFromGrc20Json, EntityNotFoundError, encodeToGrc20Json } from './entity.js';
4-
import type { DocumentContent, Entity } from './types.js';
4+
import type { DocumentContent, DocumentEntity, Entity } from './types.js';
55

66
/**
77
* Update an existing entity model of given type in the repo.
@@ -32,7 +32,7 @@ export const update = <const S extends Schema.Schema.AnyNoContext>(handle: DocHa
3232
// TODO: Try to get a diff of the entity properties and only override the changed ones.
3333
updated = { ...decodeFromGrc20Json(type, entity), ...data };
3434

35-
const encoded = {
35+
const encoded: DocumentEntity = {
3636
...encodeToGrc20Json(type, updated),
3737
'@@types@@': [typeName],
3838
__deleted: entity.__deleted ?? false,

0 commit comments

Comments
 (0)