diff --git a/lib/ipaddr.js.d.ts b/lib/ipaddr.js.d.ts index 62afab3..048c6e4 100644 --- a/lib/ipaddr.js.d.ts +++ b/lib/ipaddr.js.d.ts @@ -22,7 +22,7 @@ declare module "ipaddr.js" { export function parse(addr: string): IPv4 | IPv6; export function parseCIDR(mask: string): [IPv4 | IPv6, number]; export function process(addr: string): IPv4 | IPv6; - export function subnetMatch(addr: IPv4 | IPv6, rangeList: RangeList, defaultName?: string): string; + export function subnetMatch, D extends string = "unicast">(addr: IPv4 | IPv6, rangeList: L, defaultName?: D): keyof L | D; export class IPv4 extends IP { static broadcastAddressFromCIDR(addr: string): IPv4; @@ -40,7 +40,7 @@ declare module "ipaddr.js" { kind(): 'ipv4'; match(what: IPv4 | IPv6 | [IPv4 | IPv6, number], bits?: number): boolean; range(): IPv4Range; - subnetMatch(rangeList: RangeList, defaultName?: string): string; + subnetMatch, D extends string = "unicast">(rangeList: L, defaultName?: D): keyof L | D; toIPv4MappedAddress(): IPv6; } @@ -61,7 +61,7 @@ declare module "ipaddr.js" { kind(): 'ipv6'; match(what: IPv4 | IPv6 | [IPv4 | IPv6, number], bits?: number): boolean; range(): IPv6Range; - subnetMatch(rangeList: RangeList, defaultName?: string): string; + subnetMatch, D extends string = "unicast">(rangeList: L, defaultName?: D): keyof L | D; toIPv4Address(): IPv4; toRFC5952String(): string; }