mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 23:07:06 +00:00
Merge pull request #33365 from adamzerella/types/cipher-base
[cipher-base] Add typing for cipher-base
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import CipherBase = require("cipher-base");
|
||||
|
||||
const buf = new Buffer(1);
|
||||
|
||||
class CipherTest extends CipherBase {
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
final() {
|
||||
return buf;
|
||||
}
|
||||
|
||||
update(testBuffer: Buffer) {
|
||||
return testBuffer;
|
||||
}
|
||||
}
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// Type definitions for cipher-base 1.0
|
||||
// Project: https://github.com/crypto-browserify/cipher-base
|
||||
// Definitions by: Adam Zerella <https://github.com/adamzerella>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
declare abstract class CipherBase {
|
||||
constructor(hashMode?: string);
|
||||
abstract final(): Buffer;
|
||||
abstract update(value: Buffer, inputEnc?: string, outputEnc?: string): Buffer;
|
||||
}
|
||||
|
||||
export = CipherBase;
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [
|
||||
|
||||
],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"cipher-base-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Reference in New Issue
Block a user