-
Notifications
You must be signed in to change notification settings - Fork 223
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
Hi, I'm creating a JSI module and I have registered the module on the global object, here is my index.ts:
export type CoinType = 'ethereum';
declare const WalletCore: {
createWallet: (
strength: 128 | 256,
passphrase?: string
) => { mnemonic: string; seed: string };
importWalletFromMnemonic: (
seed: string,
passphrase?: string
) => { mnemonic: string; seed: string };
importWalletFromHexString: (
hex: string,
passphrase?: string
) => { mnemonic: string; seed: string };
getAddressForCoin: (coinName: CoinType) => string;
deriveAddressForCoin: (coinType: CoinType, derivationPath: string) => any;
};You can see I simply declare a global variable, which works just fine for type checking, the problem comes on the example project, ESLint complains the variable has not been declared anywhere.
I have also declared the variable in the root package.json
"eslintConfig": {
"root": true,
"globals": {
"WalletCore": true
},
What's the correct way to add a global variable to ESLint so that when the library is a dependency ESLint knows about the global variable?
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested
