mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
[ssh-key-decrypt] add typings
This commit is contained in:
parent
76a13f1ad8
commit
2275ea35ed
11
types/ssh-key-decrypt/index.d.ts
vendored
Normal file
11
types/ssh-key-decrypt/index.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// Type definitions for ssh-key-decrypt 0.1
|
||||
// Project: https://github.com/isaacs/ssh-key-decrypt#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
export = decrypt;
|
||||
|
||||
declare function decrypt(data: string | Buffer, passphrase: string, outEnc?: 'buffer'): Buffer;
|
||||
declare function decrypt(data: string | Buffer, passphrase: string, outEnc: BufferEncoding): string;
|
||||
8
types/ssh-key-decrypt/ssh-key-decrypt-tests.ts
Normal file
8
types/ssh-key-decrypt/ssh-key-decrypt-tests.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import decrypt = require('ssh-key-decrypt');
|
||||
|
||||
decrypt('', ''); // $ExpectType Buffer
|
||||
decrypt(new Buffer(''), ''); // $ExpectType Buffer
|
||||
decrypt('', '', 'buffer'); // $ExpectType Buffer
|
||||
decrypt(new Buffer(''), '', 'buffer'); // $ExpectType Buffer
|
||||
decrypt('', '', 'latin1'); // $ExpectType string
|
||||
decrypt(new Buffer(''), '', 'latin1'); // $ExpectType string
|
||||
22
types/ssh-key-decrypt/tsconfig.json
Normal file
22
types/ssh-key-decrypt/tsconfig.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"ssh-key-decrypt-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/ssh-key-decrypt/tslint.json
Normal file
1
types/ssh-key-decrypt/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user