mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
Add types for is-ssh (#37807)
This commit is contained in:
committed by
Sheetal Nandi
parent
c4b93707db
commit
67612a87f4
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
// Type definitions for is-ssh 1.3
|
||||
// Project: https://github.com/IonicaBizau/node-is-ssh
|
||||
// Definitions by: Florian Keller <https://github.com/ffflorian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* @param input The input url or an array of protocols.
|
||||
* @returns `true` if the input is a ssh url, `false` otherwise.
|
||||
*/
|
||||
declare function isSsh(input: string | string[]): boolean;
|
||||
|
||||
export = isSsh;
|
||||
@@ -0,0 +1,6 @@
|
||||
import isSsh = require('is-ssh');
|
||||
|
||||
isSsh('ssh://user@host.xz:port/path/to/repo.git/'); // $ExpectType boolean
|
||||
isSsh('ssh://user@host.xz/path/to/repo.git/'); // $ExpectType boolean
|
||||
isSsh('ssh://host.xz:port/path/to/repo.git/'); // $ExpectType boolean
|
||||
isSsh('ssh://host.xz/path/to/repo.git/'); // $ExpectType boolean
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"is-ssh-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user