invariant-packages
invariant-packages copied to clipboard
Typescript nodenext module issue
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);
};
