DefinitelyTyped/types/ipcheck/ipcheck-tests.ts
Ben Grynhaus c6614dd157 Added types for 'ipcheck' (#23813)
* 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
2018-02-26 13:45:54 -08:00

20 lines
320 B
TypeScript

import * as ipcheck from "ipcheck";
ipcheck.match(1, 1); // $ExpectError
ipcheck.match("", 1); // $ExpectError
ipcheck.match(1, ""); // $ExpectError
new ipcheck(1); // $ExpectError
const ip = new ipcheck("");
// $ExpectError
if (ip.ipv === 1) {
}
// $ExpectError
if (ip.ipv === 1) {
}
ip.match(1); // $ExpectError