From ebf1ffb2afe460bcb2a55b218f49194d3960c62f Mon Sep 17 00:00:00 2001
From: Gautam Singh <5769869+gautamsi@users.noreply.github.com>
Date: Sun, 22 Dec 2024 23:33:20 -0600
Subject: [PATCH] fix types
---
design-system/packages/modals/src/DrawerController.tsx | 8 +++++---
examples/assets-local/keystone.ts | 2 +-
examples/assets-s3/keystone.ts | 2 +-
examples/custom-session-invalidation/keystone.ts | 4 ++--
examples/extend-graphql-schema-nexus/schema.ts | 1 +
packages/core/src/scripts/build.ts | 3 ++-
.../component-blocks/component-block-render.tsx | 2 +-
7 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/design-system/packages/modals/src/DrawerController.tsx b/design-system/packages/modals/src/DrawerController.tsx
index 271d4788384..6325f0c2f5c 100644
--- a/design-system/packages/modals/src/DrawerController.tsx
+++ b/design-system/packages/modals/src/DrawerController.tsx
@@ -28,9 +28,11 @@ export const DrawerController = ({ isOpen, children }: DrawerControllerProps) =>
return (
{transitionState => (
-
- {children}
-
+
+
+ {children}
+
+
)}
)
diff --git a/examples/assets-local/keystone.ts b/examples/assets-local/keystone.ts
index de4cfc66bac..327cb44c4fc 100644
--- a/examples/assets-local/keystone.ts
+++ b/examples/assets-local/keystone.ts
@@ -12,7 +12,7 @@ export default config({
},
lists,
server: {
- maxFileSize: bytes('40Mb')
+ maxFileSize: bytes('40Mb')!,
},
storage: {
my_images: {
diff --git a/examples/assets-s3/keystone.ts b/examples/assets-s3/keystone.ts
index c317b20e4e5..33b3363924f 100644
--- a/examples/assets-s3/keystone.ts
+++ b/examples/assets-s3/keystone.ts
@@ -20,7 +20,7 @@ export default config({
},
lists,
server: {
- maxFileSize: bytes('8Mb')
+ maxFileSize: bytes('8Mb')!,
},
storage: {
my_images: {
diff --git a/examples/custom-session-invalidation/keystone.ts b/examples/custom-session-invalidation/keystone.ts
index cbcfcf97ff1..174174817bb 100644
--- a/examples/custom-session-invalidation/keystone.ts
+++ b/examples/custom-session-invalidation/keystone.ts
@@ -67,7 +67,7 @@ function withSessionInvalidation (config: Config) {
export default withSessionInvalidation(
withAuth(
- config({
+ config({
db: {
provider: 'sqlite',
url: process.env.DATABASE_URL || 'file:./keystone-example.db',
@@ -80,4 +80,4 @@ export default withSessionInvalidation(
session: statelessSessions(),
})
)
-)
+) as any as TypeInfo;
diff --git a/examples/extend-graphql-schema-nexus/schema.ts b/examples/extend-graphql-schema-nexus/schema.ts
index bb46bbaf2af..858bd341b41 100644
--- a/examples/extend-graphql-schema-nexus/schema.ts
+++ b/examples/extend-graphql-schema-nexus/schema.ts
@@ -95,6 +95,7 @@ export function extendGraphqlSchema (baseSchema: GraphQLSchema) {
// Typescript output settings, probably something you might commit in dev
// TODO: remove false ??, it is not part of the example, but we are having monorepo issues
+ // @ts-expect-error
// eslint-disable-next-line no-constant-binary-expression
shouldGenerateArtifacts: false ?? process.env.NODE_ENV !== 'production',
outputs: {
diff --git a/packages/core/src/scripts/build.ts b/packages/core/src/scripts/build.ts
index 14ddbb1f990..8d0e19b6928 100644
--- a/packages/core/src/scripts/build.ts
+++ b/packages/core/src/scripts/build.ts
@@ -50,6 +50,7 @@ export async function build (
undefined,
undefined,
undefined,
- 'default'
+ 'default',
+ undefined,
)
}
diff --git a/packages/fields-document/src/DocumentEditor/component-blocks/component-block-render.tsx b/packages/fields-document/src/DocumentEditor/component-blocks/component-block-render.tsx
index 66d0bc14749..8ca3c12d7b2 100644
--- a/packages/fields-document/src/DocumentEditor/component-blocks/component-block-render.tsx
+++ b/packages/fields-document/src/DocumentEditor/component-blocks/component-block-render.tsx
@@ -42,7 +42,7 @@ export function ComponentBlockRender ({
const childrenByPath: Record = {}
let maybeChild: ReactElement | undefined
- children.forEach((child: ReactElement) => {
+ children.forEach((child: ReactElement) => {
const propPath = child.props.children.props.element.propPath
if (propPath === undefined) {
maybeChild = child