Could not find a declaration file for module import

Could not find a declaration file for module

'openai/resources/beta/threads/index.mjs'. 'c:/Users/git-projects/[project]/node_modules/openai/resources/beta/threads/index.mjs' implicitly has an 'any' type.

How can I fix this typescript error

This is the import

import {Run, ThreadMessage} from ‘openai/resources/beta/threads/index.mjs’

I already tried to add

"moduleResolution": "node16", "esModuleInterop": true, "allowSyntheticDefaultImports": true,

In the next.config file

and

// openai.d.ts
declare module 'openai/resources/beta/threads/index.mjs' {
export interface Run {
// Define the properties of Run here, e.g.:
id: string;
status: string;
// Add other properties as per your requirements...
}

export interface ThreadMessage {
// Define the properties of ThreadMessage here, e.g.:
messageId: string;
content: string;
// Add other properties as per your requirements...
}

export {
Run,
ThreadMessage,
};
}