mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-14 22:10:30 +00:00
Merge pull request #33560 from BendingBender/remove-is-online
[is-online] Remove types
This commit is contained in:
@@ -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",
|
||||
|
||||
Vendored
-34
@@ -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';
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user