From be9b5adfa3028b3c3fbeb612d7ee935d8f66eb98 Mon Sep 17 00:00:00 2001 From: Jacob Fletcher Date: Mon, 21 Nov 2022 12:04:54 -0500 Subject: [PATCH] types: passes generic through FilterOptions --- src/fields/config/types.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/fields/config/types.ts b/src/fields/config/types.ts index 1b8fea33d8..6460526e21 100644 --- a/src/fields/config/types.ts +++ b/src/fields/config/types.ts @@ -2,7 +2,7 @@ import { CSSProperties } from 'react'; import { Editor } from 'slate'; import type { TFunction } from 'i18next'; -import { Operation, Where } from '../../types'; +import { Document, Operation, Where } from '../../types'; import { TypeWithID } from '../../collections/config/types'; import { PayloadRequest } from '../../express/types'; import { ConditionalDateProps } from '../../admin/components/elements/DatePicker/types'; @@ -45,15 +45,15 @@ export type FieldAccess = (args: { export type Condition = (data: Partial, siblingData: Partial

) => boolean; -export type FilterOptionsProps = { +export type FilterOptionsProps = { id: string | number, user: Partial, - data: unknown, + data: T, siblingData: unknown, relationTo: string | string[], } -export type FilterOptions = Where | ((options: FilterOptionsProps) => Where); +export type FilterOptions = Where | ((options: FilterOptionsProps) => Where); type Admin = { position?: 'sidebar';