79163011

Date: 2024-11-06 14:26:17
Score: 2.5
Natty:
Report link

In my case I use the "store" module. And I have the same problem export = syntax in the lib.

To solve my problem, I created file

types.d.ts

declare module 'store' {
  export interface StoreJsAPI extends globalThis.StoreJsAPI {
     // your methods to overwrite
    method(options?: any): any;
  }

  export const store: StoreJsAPI;
}

and in my ts file

import * as store from 'store';

store.method({})

And it let me extend lib types with export = syntax :)

I hope It helps somebody :)

Reasons:
  • Blacklisted phrase (1): I have the same problem
  • Whitelisted phrase (-1): hope It helps
  • Has code block (-0.5):
  • Me too answer (2.5): I have the same problem
  • Low reputation (0.5):
Posted by: Aleksey Zikrackiy