From 7621d0db75033b68a510d5f6c9b03d9418980e73 Mon Sep 17 00:00:00 2001 From: Gautam Singh <5769869+gautamsi@users.noreply.github.com> Date: Tue, 14 Sep 2021 06:31:02 +0530 Subject: [PATCH] export field types (#6481) --- .changeset/old-houses-yawn.md | 5 +++++ packages/keystone/src/fields/index.ts | 14 ++++++++++++++ .../keystone/src/fields/types/password/index.ts | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 .changeset/old-houses-yawn.md diff --git a/.changeset/old-houses-yawn.md b/.changeset/old-houses-yawn.md new file mode 100644 index 00000000000..324e9160685 --- /dev/null +++ b/.changeset/old-houses-yawn.md @@ -0,0 +1,5 @@ +--- +'@keystone-next/keystone': patch +--- + +Exported Field types to help in updating contrib packages diff --git a/packages/keystone/src/fields/index.ts b/packages/keystone/src/fields/index.ts index 70ac5f483ed..8b72264efd4 100644 --- a/packages/keystone/src/fields/index.ts +++ b/packages/keystone/src/fields/index.ts @@ -1,14 +1,28 @@ export { autoIncrement } from './types/autoIncrement'; +export type { AutoIncrementFieldConfig } from './types/autoIncrement'; export { checkbox } from './types/checkbox'; +export type { CheckboxFieldConfig } from './types/checkbox'; export { decimal } from './types/decimal'; +export type { DecimalFieldConfig } from './types/decimal'; export { file } from './types/file'; +export type { FileFieldConfig } from './types/file'; export { float } from './types/float'; +export type { FloatFieldConfig } from './types/float'; export { integer } from './types/integer'; +export type { IntegerFieldConfig } from './types/integer'; export { image } from './types/image'; +export type { ImageFieldConfig } from './types/image'; export { json } from './types/json'; +export type { JsonFieldConfig } from './types/json'; export { password } from './types/password'; +export type { PasswordFieldConfig } from './types/password'; export { relationship } from './types/relationship'; +export type { RelationshipFieldConfig } from './types/relationship'; export { select } from './types/select'; +export type { SelectFieldConfig } from './types/select'; export { text } from './types/text'; +export type { TextFieldConfig } from './types/text'; export { timestamp } from './types/timestamp'; +export type { TimestampFieldConfig } from './types/timestamp'; export { virtual } from './types/virtual'; +export type { VirtualFieldConfig } from './types/virtual'; diff --git a/packages/keystone/src/fields/types/password/index.ts b/packages/keystone/src/fields/types/password/index.ts index 3984d94a265..e8d4b6c16ab 100644 --- a/packages/keystone/src/fields/types/password/index.ts +++ b/packages/keystone/src/fields/types/password/index.ts @@ -11,7 +11,7 @@ import { } from '../../../types'; import { resolveView } from '../../resolve-view'; -type PasswordFieldConfig = +export type PasswordFieldConfig = CommonFieldConfig & { /** * @default 8