Skip to content

Commit 679c59b

Browse files
committed
Make model relationship fields optional
1 parent 083c0fe commit 679c59b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ type ProxiedModel<
5656
Schemas extends Record<string, JsonApiResource>,
5757
> = Schema &
5858
Schema['attributes'] & {
59-
[Property in keyof NonNullable<Schema['relationships']>]: NonNullable<
59+
[Property in keyof NonNullable<Schema['relationships']>]?: NonNullable<
6060
NonNullable<Schema['relationships']>[Property]
6161
> extends { data?: infer Data }
6262
? Data extends { type: infer RelatedType extends string }

0 commit comments

Comments
 (0)