I try to write some test unit with the following global variable

declare global{
  namespace NodeJS {
    interface Global {
      signin(): string;
    }
  }
}


global.signin = () => { 

  return ["test"] ;

};

I got error on the global.signin:

"Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature."

0

There are 0 best solutions below