From eeae9b39acbbba6dd6abe69dcc097bfb98615d23 Mon Sep 17 00:00:00 2001 From: Rory Jennings Date: Mon, 5 Sep 2022 10:27:08 +0100 Subject: [PATCH] fix(oneOf): identify Nullable type returned from oneOf method --- src/relations/Relation.ts | 4 ++-- src/relations/oneOf.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/relations/Relation.ts b/src/relations/Relation.ts index 291c9089..4cea8342 100644 --- a/src/relations/Relation.ts +++ b/src/relations/Relation.ts @@ -25,8 +25,8 @@ export enum RelationKind { ManyOf = 'MANY_OF', } -export interface RelationAttributes { - nullable: boolean +export interface RelationAttributes { + nullable: Nullable unique: boolean } diff --git a/src/relations/oneOf.ts b/src/relations/oneOf.ts index c72516bf..c67fe7c5 100644 --- a/src/relations/oneOf.ts +++ b/src/relations/oneOf.ts @@ -1,9 +1,9 @@ import { OneOf, Relation, RelationAttributes, RelationKind } from './Relation' -export function oneOf( +export function oneOf( to: ModelName, - attributes?: Partial, -): OneOf { + attributes?: Partial>, +): OneOf { return new Relation({ to, kind: RelationKind.OneOf,