Skip to content

Commit

Permalink
fix(node): in node@18 'AddressInfo.family' is number
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov authored Apr 25, 2022
1 parent b2d66e0 commit 7adf603
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types/node/net.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ declare module 'net' {
import * as dns from 'node:dns';
type LookupFunction = (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void;
interface AddressInfo {
address: string;
address: string | number; // number since v18 and string for all previous versions
family: string;
port: number;
}
Expand Down

0 comments on commit 7adf603

Please sign in to comment.