Merge pull request #33560 from BendingBender/remove-is-online

[is-online] Remove types
This commit is contained in:
Nathan Shively-Sanders
2019-03-04 09:51:02 -08:00
committed by GitHub
5 changed files with 6 additions and 64 deletions
+6
View File
@@ -834,6 +834,12 @@
"sourceRepoURL": "https://github.com/blakeembrey/is-lower-case",
"asOfVersion": "1.1.2"
},
{
"libraryName": "is-online",
"typingsPackageName": "is-online",
"sourceRepoURL": "https://github.com/sindresorhus/is-online",
"asOfVersion": "8.1.0"
},
{
"libraryName": "is-plain-object",
"typingsPackageName": "is-plain-object",
-34
View File
@@ -1,34 +0,0 @@
// Type definitions for is-online 8.0
// Project: https://github.com/sindresorhus/is-online#readme
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = isOnline;
/**
* Check if the internet connection is up.
*
* The following checks are run in parallel:
* - Retrieve [icanhazip.com](https://github.com/major/icanhaz) via HTTPS
* - Query `myip.opendns.com` on OpenDNS (Node.js only)
* - Retrieve Apple's Captive Portal test page (Node.js only)
*
* When the first check succeeds, the returned Promise is resolved to `true`.
*/
declare function isOnline(options?: isOnline.Options): Promise<boolean>;
declare namespace isOnline {
interface Options {
/**
* Milliseconds to wait for a server to respond.
* @default 5000
*/
timeout?: number;
/**
* Internet Protocol version to use. This is an advanced option that is usually not necessary to be set,
* but it can prove useful to specifically assert IPv6 connectivity.
* @default 'v4'
*/
version?: 'v4' | 'v6';
}
}
-6
View File
@@ -1,6 +0,0 @@
import isOnline = require('is-online');
isOnline(); // $ExpectType Promise<boolean>
isOnline({ timeout: 10 }); // $ExpectType Promise<boolean>
isOnline({ version: 'v4' }); // $ExpectType Promise<boolean>
isOnline({ version: 'v6' }); // $ExpectType Promise<boolean>
-23
View File
@@ -1,23 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"is-online-tests.ts"
]
}
-1
View File
@@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }