diff --git a/.changeset/pink-turkeys-cough.md b/.changeset/pink-turkeys-cough.md new file mode 100644 index 0000000000..ab15da5d64 --- /dev/null +++ b/.changeset/pink-turkeys-cough.md @@ -0,0 +1,5 @@ +--- +"@talismn/chaindata-provider-extension": patch +--- + +build: use type import for types only library diff --git a/packages/chaindata-provider-extension/src/codegen.ts b/packages/chaindata-provider-extension/src/codegen.ts index 7186336314..1821853a3f 100644 --- a/packages/chaindata-provider-extension/src/codegen.ts +++ b/packages/chaindata-provider-extension/src/codegen.ts @@ -30,6 +30,7 @@ const config: CodegenConfig = { // defaults to `any` - let's go with `unknown` instead :) JSON: "unknown", }, + useTypeImports: true, }, hooks: { afterAllFileWrite: ["prettier --write"] }, }, diff --git a/packages/chaindata-provider-extension/src/graphql-codegen/gql.ts b/packages/chaindata-provider-extension/src/graphql-codegen/gql.ts index 65526d566a..844dd07a6b 100644 --- a/packages/chaindata-provider-extension/src/graphql-codegen/gql.ts +++ b/packages/chaindata-provider-extension/src/graphql-codegen/gql.ts @@ -1,4 +1,4 @@ -import { TypedDocumentNode as DocumentNode } from "@graphql-typed-document-node/core" +import type { TypedDocumentNode as DocumentNode } from "@graphql-typed-document-node/core" /* eslint-disable */ import * as types from "./graphql" diff --git a/packages/chaindata-provider-extension/src/graphql-codegen/graphql.ts b/packages/chaindata-provider-extension/src/graphql-codegen/graphql.ts index b8c7441f85..1d542e3f73 100644 --- a/packages/chaindata-provider-extension/src/graphql-codegen/graphql.ts +++ b/packages/chaindata-provider-extension/src/graphql-codegen/graphql.ts @@ -1,5 +1,5 @@ /* eslint-disable */ -import { TypedDocumentNode as DocumentNode } from "@graphql-typed-document-node/core" +import type { TypedDocumentNode as DocumentNode } from "@graphql-typed-document-node/core" export type Maybe = T | null export type InputMaybe = Maybe export type Exact = { [K in keyof T]: T[K] }