Skip to content

Commit

Permalink
correct typescript definition for subnetMatch
Browse files Browse the repository at this point in the history
  • Loading branch information
rigelk authored and whitequark committed May 17, 2018
1 parent 845a4f2 commit 8e69afe
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/ipaddr.js.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ declare module "ipaddr.js" {
export function parse(addr: string): IPv4 | IPv6;
export function parseCIDR(mask: string): [IPv4 | IPv6, number];
export function process(address: string): IPv4 | IPv6;
export function subnetMatch(addr: IPv4, rangeList: RangeList<IPv4>, defaultName?: string): boolean;
export function subnetMatch(addr: IPv6, rangeList: RangeList<IPv6>, defaultName?: string): boolean;
export function subnetMatch(addr: IPv4, rangeList: RangeList<IPv4>, defaultName?: string): string;
export function subnetMatch(addr: IPv6, rangeList: RangeList<IPv6>, defaultName?: string): string;

export class IPv4 extends IP {
static broadcastAddressFromCIDR(addr: string): IPv4;
Expand All @@ -44,7 +44,7 @@ declare module "ipaddr.js" {
match(addr: IPv4, bits: number): boolean;
match(mask: [IPv4, number]): boolean;
range(): IPv4Range;
subnetMatch(rangeList: RangeList<IPv4>, defaultName?: string): boolean;
subnetMatch(rangeList: RangeList<IPv4>, defaultName?: string): string;
toIPv4MappedAddress(): IPv6;
}

Expand All @@ -62,10 +62,10 @@ declare module "ipaddr.js" {
match(addr: IPv6, bits: number): boolean;
match(mask: [IPv6, number]): boolean;
range(): IPv6Range;
subnetMatch(rangeList: RangeList<IPv6>, defaultName?: string): boolean;
subnetMatch(rangeList: RangeList<IPv6>, defaultName?: string): string;
toIPv4Address(): IPv4;
}
}

export = Address;
}
}

0 comments on commit 8e69afe

Please sign in to comment.