react18-tools / esbuild-react18-useclient

esbuild plugin for compiling libraries compatible with React 18 server and client component, Nextjs13, Remix, etc. Please use Turborepo Template -> https://github.com/react18-tools/turborepo-template
https://github.com/react18-tools/turborepo-template
MIT License
6 stars 0 forks source link

IDE showing type error #3

Closed mayank1513 closed 1 year ago

mayank1513 commented 1 year ago

IDE showing following error

Argument of type '(options: Options) => { format: ("cjs" | "esm")[]; target: "es2019"; sourcemap: true; clean: true; minify: boolean; plugins: typeof import("C:/Users/G/web/open-source/nextjs-themes/node_modules/.pnpm/esbuild-react18-useclient@1.0.4/node_modules/esbuild-react18-useclient/index")[]; }' is not assignable to parameter of type 'Options | Options[] | ((overrideOptions: Options) => MaybePromise<Options | Options[]>)'.
  Type '(options: Options) => { format: ("cjs" | "esm")[]; target: "es2019"; sourcemap: true; clean: true; minify: boolean; plugins: typeof import("C:/Users/G/web/open-source/nextjs-themes/node_modules/.pnpm/esbuild-react18-useclient@1.0.4/node_modules/esbuild-react18-useclient/index")[]; }' is not assignable to type '(overrideOptions: Options) => MaybePromise<Options | Options[]>'.
    Type '{ format: ("cjs" | "esm")[]; target: "es2019"; sourcemap: true; clean: true; minify: boolean; plugins: (typeof reactUseClientPlugin)[]; }' is not assignable to type 'MaybePromise<Options | Options[]>'.
      Type '{ format: ("cjs" | "esm")[]; target: "es2019"; sourcemap: true; clean: true; minify: boolean; plugins: (typeof reactUseClientPlugin)[]; }' is not assignable to type 'Options'.
        Types of property 'plugins' are incompatible.
          Type 'typeof import("C:/Users/G/web/open-source/nextjs-themes/node_modules/.pnpm/esbuild-react18-useclient@1.0.4/node_modules/esbuild-react18-useclient/index")[]' is not assignable to type 'Plugin[]'.
            Property 'name' is missing in type 'typeof import("C:/Users/G/web/open-source/nextjs-themes/node_modules/.pnpm/esbuild-react18-useclient@1.0.4/node_modules/esbuild-react18-useclient/index")' but required in type 'Plugin'.ts(2345)
index.d.ts(41, 5): 'name' is declared here.