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

Fix types for ENSInstance.batch #52

Closed
kliyer-ai opened this issue Sep 20, 2022 · 0 comments · Fixed by #81
Closed

Fix types for ENSInstance.batch #52

kliyer-ai opened this issue Sep 20, 2022 · 0 comments · Fixed by #81

Comments

@kliyer-ai
Copy link

The return type after awaiting the promise is any[] | undefined. Any chance that could be adjusted to reflect the real return type of the batched functions? Thanks!

Example below. Check the type of res.

import { ENS } from '@ensdomains/ensjs'
import { providers } from 'ethers'

const provider = new providers.AlchemyProvider(1, process.env.ALCHEMY_KEY)
const ENSInstance = new ENS()
await ENSInstance.setProvider(provider)

const res = await ENSInstance.batch(
  ENSInstance.getName.batch('0x0000000000000000000000000000000000000000')
)
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

Successfully merging a pull request may close this issue.

1 participant