mistralai / client-js

JS Client library for Mistral AI platform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compilation Error: Interface Property Initializer in client.d.ts

raslasarslas opened this issue · comments

Hello

When attempting to compile a project that includes @mistralai/mistralai as a dependency, TypeScript compilation fails with an error related to an interface property having an initializer.

Error Output

$ tsc
node_modules/@mistralai/mistralai/src/client.d.ts:49:26 - error TS1246: An interface property cannot have an initializer.
49         type: ToolType = ToolType.function;
                            ~~~~~~~~~~~~~~~~~

Steps to Reproduce

  1. Include @mistralai/mistralai in a TypeScript project.
  2. Run the TypeScript compiler (tsc).
  3. Observe the compilation error related to client.d.ts.

Environment

  • TypeScript Version: 4.9.5
  • @mistralai/mistralai Version: 0.1.3
  • Node.js Version: v18.13.0

Hello

When attempting to compile a project that includes @mistralai/mistralai as a dependency, TypeScript compilation fails with an error related to an interface property having an initializer.

Error Output

$ tsc
node_modules/@mistralai/mistralai/src/client.d.ts:49:26 - error TS1246: An interface property cannot have an initializer.
49         type: ToolType = ToolType.function;
                            ~~~~~~~~~~~~~~~~~

Steps to Reproduce

  1. Include @mistralai/mistralai in a TypeScript project.
  2. Run the TypeScript compiler (tsc).
  3. Observe the compilation error related to client.d.ts.

Environment

  • TypeScript Version: 4.9.5
  • @mistralai/mistralai Version: 0.1.3
  • Node.js Version: v18.13.0

Hi, I have the same issue.
Do you have any workarounds to fix it?
Thanks.