Skip to content

Instantly share code, notes, and snippets.

@Ashoat
Created November 2, 2023 18:57
Show Gist options
  • Save Ashoat/f5b3517c46331ecae6870d91cae7ddd2 to your computer and use it in GitHub Desktop.
Save Ashoat/f5b3517c46331ecae6870d91cae7ddd2 to your computer and use it in GitHub Desktop.
Error --------------------------------------------------------------------- components/ens-cache-provider.react.js:34:38
Cannot assign baseGetENSNames.bind(...) to getENSNames because empty [1] is incompatible with BaseUserInfo [2] in array
element of the first parameter. [incompatible-type]
components/ens-cache-provider.react.js
31| return defaultContext;
32| }
33| const ensCache = new ENSCache(provider);
34| const getENSNames: GetENSNames = baseGetENSNames.bind(null, ensCache);
35| return { ensCache, getENSNames };
36| }, [provider]);
37| return (
utils/ens-helpers.js
[2] 7| export type GetENSNames = <T: ?BaseUserInfo>(
8| users: $ReadOnlyArray<T>,
9| ) => Promise<T[]>;
10|
[1] 11| async function getENSNames<T: ?BaseUserInfo>(
Error --------------------------------------------------------------------- components/ens-cache-provider.react.js:34:38
Cannot assign baseGetENSNames.bind(...) to getENSNames because empty [1] is incompatible with null or undefined [2] in
array element of the first parameter. [incompatible-type]
components/ens-cache-provider.react.js
31| return defaultContext;
32| }
33| const ensCache = new ENSCache(provider);
34| const getENSNames: GetENSNames = baseGetENSNames.bind(null, ensCache);
35| return { ensCache, getENSNames };
36| }, [provider]);
37| return (
utils/ens-helpers.js
[2] 7| export type GetENSNames = <T: ?BaseUserInfo>(
8| users: $ReadOnlyArray<T>,
9| ) => Promise<T[]>;
10|
[1] 11| async function getENSNames<T: ?BaseUserInfo>(
Error --------------------------------------------------------------------- components/ens-cache-provider.react.js:34:38
Cannot assign baseGetENSNames.bind(...) to getENSNames because empty [1] is incompatible with BaseUserInfo [2] in array
element of type argument R [3] of the return value. [incompatible-type-arg]
components/ens-cache-provider.react.js
31| return defaultContext;
32| }
33| const ensCache = new ENSCache(provider);
34| const getENSNames: GetENSNames = baseGetENSNames.bind(null, ensCache);
35| return { ensCache, getENSNames };
36| }, [provider]);
37| return (
/private/tmp/flow/flowlib_ea0c1d4f3fb3e484_501/core.js
[3] 1841| declare class Promise<+R = mixed> {
utils/ens-helpers.js
[2] 7| export type GetENSNames = <T: ?BaseUserInfo>(
8| users: $ReadOnlyArray<T>,
9| ) => Promise<T[]>;
10|
[1] 11| async function getENSNames<T: ?BaseUserInfo>(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment