mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 19:07:08 +00:00
Add types for is-ssh (#37807)
This commit is contained in:
parent
c4b93707db
commit
67612a87f4
12
types/is-ssh/index.d.ts
vendored
Normal file
12
types/is-ssh/index.d.ts
vendored
Normal file
@ -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;
|
||||
6
types/is-ssh/is-ssh-tests.ts
Normal file
6
types/is-ssh/is-ssh-tests.ts
Normal file
@ -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
|
||||
23
types/is-ssh/tsconfig.json
Normal file
23
types/is-ssh/tsconfig.json
Normal file
@ -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"
|
||||
]
|
||||
}
|
||||
1
types/is-ssh/tslint.json
Normal file
1
types/is-ssh/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user