mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
feat(dev-ip): Add types for dev-ip (#29913)
This commit is contained in:
committed by
Sheetal Nandi
parent
cbcc683dee
commit
98a045b99c
@@ -0,0 +1,13 @@
|
||||
import devIp = require("dev-ip");
|
||||
|
||||
const ips = devIp();
|
||||
|
||||
function main() {
|
||||
if (typeof ips === "boolean") {
|
||||
return;
|
||||
}
|
||||
|
||||
ips.map(ip => `ip: ${ip}`);
|
||||
}
|
||||
|
||||
main();
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
// Type definitions for dev-ip 1.0
|
||||
// Project: https://github.com/shakyshane/dev-ip
|
||||
// Definitions by: Mike Engel <https://github.com/mike-engel>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* Returns either an array of IP addresses or false if none can be found (offline, etc)
|
||||
*/
|
||||
declare function devIp(): string[] | boolean;
|
||||
|
||||
export = devIp;
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": ["es6"],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": ["../"],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": ["index.d.ts", "dev-ip-tests.ts"]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user