From a014c2125a5496b65a1f537a58113e60a94cb5e5 Mon Sep 17 00:00:00 2001 From: Romain Lanz <2793951+RomainLanz@users.noreply.github.com> Date: Sat, 23 Sep 2023 22:44:14 +0200 Subject: [PATCH] fix(types): allow belongs to and has one to be null (#958) --- src/types/relations.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/relations.ts b/src/types/relations.ts index c05dc1dd..a48a8b36 100644 --- a/src/types/relations.ts +++ b/src/types/relations.ts @@ -114,7 +114,7 @@ export type ThroughRelationOptions< export type HasOneDecorator = ( model: () => RelatedModel, options?: RelationOptions> -) => TypedDecorator> +) => TypedDecorator | null> /** * Decorator signature to define has many relationship @@ -130,7 +130,7 @@ export type HasManyDecorator = ( export type BelongsToDecorator = ( model: () => RelatedModel, options?: RelationOptions> -) => TypedDecorator> +) => TypedDecorator | null> /** * Decorator signature to define many to many relationship