invariant-packages icon indicating copy to clipboard operation
invariant-packages copied to clipboard

Typescript nodenext module issue

Open ShravanSunder opened this issue 2 years ago • 0 comments

i'm getting the error Assertions require every name in the call target to be declared with an explicit type annotation.. i'm using typescript 4.7.3 with module: 'nodenext'


const { invariant } = await import('ts-invariant');
const { merge } = await import('merge-anything');

export const ethersOverride = (context: IEthersContext, options: TOverride): Readonly<TEthersAdaptor> => {
  // check if there is an override
  if (options.adaptorEnabled) {
    invariant(
      options.alternateContextKey == null,
      'You cannot use both contextOverride and contextKey at the same time'
    );

    return options.adaptor ?? {};
    Í;
  }

  return asEthersAdaptor(context);
};

2022 06 15-07 33-Visual Studio Code hookHelpers ts — eth-hooks

ShravanSunder avatar Jun 15 '22 11:06 ShravanSunder