Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
fix: #resolve accepts correct options type
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtPooki committed Nov 2, 2023
1 parent 7019059 commit 9b961ca
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/ipns/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,12 @@ export interface DNSResolver {
(domain: string, options?: ResolveDnsLinkOptions): Promise<string>
}

export interface ResolveDNSOptions extends AbortOptions, ProgressOptions<ResolveDnsLinkProgressEvents> {
export interface ResolveDNSOptions extends AbortOptions, ProgressOptions<ResolveProgressEvents | IPNSRoutingEvents | ResolveDnsLinkProgressEvents> {
/**
* Do not query the network for the IPNS record (default: false)
*/
offline?: boolean

/**
* Do not use cached DNS entries (default: false)
*/
Expand Down Expand Up @@ -315,7 +320,7 @@ class DefaultIPNS implements IPNS {
}, options.interval ?? DEFAULT_REPUBLISH_INTERVAL_MS)
}

async #resolve (ipfsPath: string, options: any = {}): Promise<CID> {
async #resolve (ipfsPath: string, options: ResolveOptions = {}): Promise<CID> {
const parts = ipfsPath.split('/')

if (parts.length === 3) {
Expand Down

0 comments on commit 9b961ca

Please sign in to comment.