mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Added types for 'ipcheck' * Fixed tests got be according to linting guidelines * Made tsconfig stricter * Standard tslint file * Standartize ipcheck.d.ts * tslint disable in .d.ts file * disabled interface-name rule
30 lines
777 B
TypeScript
30 lines
777 B
TypeScript
// Type definitions for ipcheck 0.1
|
|
// Project: https://github.com/gosquared/ipcheck
|
|
// Definitions by: Ben Grynhaus <https://github.com/bengry>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 2.3
|
|
|
|
declare const ipcheck: ipcheck.IPCheckStatic;
|
|
export = ipcheck;
|
|
export as namespace ipcheck;
|
|
|
|
declare namespace ipcheck {
|
|
interface IPCheck {
|
|
address: number[];
|
|
input: string;
|
|
ipv: 4 | 6 | 0;
|
|
mask: number;
|
|
valid: boolean;
|
|
|
|
match(cidr: IPCheck | string): boolean;
|
|
}
|
|
|
|
interface IPCheckConstructor {
|
|
new (input: string): IPCheck;
|
|
}
|
|
|
|
interface IPCheckStatic extends IPCheckConstructor {
|
|
match(ip: IPCheck | string, cidr: IPCheck | string): boolean;
|
|
}
|
|
}
|