mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
expand createHash API support (#39991)
This commit is contained in:
committed by
Nathan Shively-Sanders
parent
c3e2aba0eb
commit
bda57b42ef
Vendored
+13
-5
@@ -1,16 +1,24 @@
|
||||
// Type definitions for create-hash 1.2
|
||||
// Project: https://github.com/crypto-browserify/createHash
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>,
|
||||
// Konstantin Yuriev <https://github.com/gallowsmaker>
|
||||
// Max Boguslavskiy <https://github.com/maxbogus>
|
||||
// Konstantin Yuriev <https://github.com/gallowsmaker>,
|
||||
// Max Boguslavskiy <https://github.com/maxbogus>,
|
||||
// Jordan Sexton <https://github.com/jordansexton>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
declare namespace createHash {
|
||||
type TypedArray = Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array | Int8Array | Int16Array | Int32Array | Float32Array | Float64Array;
|
||||
|
||||
interface HashAlgorithm {
|
||||
update(data: string): void;
|
||||
digest(target?: encoding): string;
|
||||
write(data: string): void;
|
||||
digest(target: encoding): string;
|
||||
digest(): Buffer;
|
||||
|
||||
update(data: string | Buffer | TypedArray | DataView, encoding?: string): this;
|
||||
write(data: string | Buffer | TypedArray | DataView, encoding?: string): this;
|
||||
|
||||
end(): void;
|
||||
read(): void;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user