Skip to content

Error when compiling with tsc version 5.5.3 #189

@Avi-W

Description

@Avi-W

When compiling I am getting the following error:

node_modules/@instructor-ai/instructor/dist/index.d.cts:103:129 - error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.

103             }>(params: P, requestOptions?: ClientTypeChatCompletionRequestOptions<C>) => Promise<ReturnTypeBasedOnParams<typeof this.client, P>>;
                                                                                                                                    ~~~~


Found 1 error in node_modules/@instructor-ai/instructor/dist/index.d.cts:103

tsconfig.json:

{
  "compilerOptions": {
    "target": "es2021",
    "lib": ["es2021"],
    "module": "node16",
    "types": ["node"],
    "outDir": "../dist",
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "strict": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "exactOptionalPropertyTypes": true,
    "inlineSourceMap": true,
  }
}

I was able to ignore the issue with adding "skipLibCheck": true, to tsconfig but that is not optimal.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions