Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript nodenext module issue #316

Open
ShravanSunder opened this issue Jun 15, 2022 · 0 comments
Open

Typescript nodenext module issue #316

ShravanSunder opened this issue Jun 15, 2022 · 0 comments

Comments

@ShravanSunder
Copy link

ShravanSunder commented Jun 15, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant