Skip to content

Conversation

@EAGzzyCSL
Copy link

This relates to...

fix d.ts of dns interceptor['pick']

Rationale

the parameter records pass to pick is from this.#records, ref code

ths.#records is a map with type Record<string, {records: {4: { ips: DNSInterceptorRecord[] } , 6: ...}}>, ref code

Status

maxItems?: number
lookup?: (hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, addresses: DNSInterceptorRecord[]) => void) => void
pick?: (origin: URL, records: DNSInterceptorOriginRecords, affinity: 4 | 6) => DNSInterceptorRecord
pick?: (origin: URL, records: { records: DNSInterceptorOriginRecords }, affinity: 4 | 6) => DNSInterceptorRecord
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a bug in the implementation rather than the types..

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh no…,what should we do? Change implementation will cause a breaking change but fix types is odd.

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 this pull request may close these issues.

2 participants