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

bug: IPNSRoutingEvents is not exported #406

Closed
SgtPooki opened this issue Jan 29, 2024 · 0 comments · Fixed by #407
Closed

bug: IPNSRoutingEvents is not exported #406

SgtPooki opened this issue Jan 29, 2024 · 0 comments · Fixed by #407
Assignees

Comments

@SgtPooki
Copy link
Member

Discovered this while working on verified-fetch in #392

export interface PublishOptions extends AbortOptions, ProgressOptions<PublishProgressEvents | IPNSRoutingEvents> {

And results in error when attempting to call onProgress events without a type that includes it

cid = await ipns.resolve(peerId, { onProgress: options?.onProgress })
// Type '((evt: ResolveProgressEvents) => void) | undefined' is not assignable to type '((evt: ResolveProgressEvents | IPNSRoutingEvents) => void) | undefined'.

cid = await ipns.resolveDns(cidOrPeerIdOrDnsLink, { onProgress: options?.onProgress })
// Type '((evt: ResolveProgressEvents) => void) | undefined' is not assignable to type '((evt: ResolveProgressEvents | IPNSRoutingEvents) => void) | undefined'.
@SgtPooki SgtPooki self-assigned this Jan 29, 2024
SgtPooki added a commit that referenced this issue Jan 29, 2024
See #406 for details about type error
@SgtPooki SgtPooki linked a pull request Jan 29, 2024 that will close this issue
achingbrain pushed a commit that referenced this issue Jan 30, 2024
Export IPNSRoutingEvents type for onProgress events

fixes #406
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