Skip to content

Commit 144bf26

Browse files
committed
add Type.optional
1 parent a94bea7 commit 144bf26

File tree

1 file changed

+2
-0
lines changed
  • packages/hypergraph/src/type

1 file changed

+2
-0
lines changed

packages/hypergraph/src/type/type.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ export const Point = Schema.transform(Schema.String, Schema.Array(Number), {
1616
encode: (points: readonly number[]) => points.join(','),
1717
});
1818

19+
export const optional = Schema.optional;
20+
1921
export const Relation = <S extends AnyNoContext>(schema: S) => {
2022
const relationSchema = Field({
2123
select: Schema.Array(schema) as unknown as Schema.Schema<ReadonlyArray<EntityWithRelation<S>>>,

0 commit comments

Comments
 (0)