diff options
| author | Yoshiya Hinosawa <stibium121@gmail.com> | 2019-03-12 14:51:51 +0900 |
|---|---|---|
| committer | Ryan Dahl <ry@tinyclouds.org> | 2019-03-12 01:51:51 -0400 |
| commit | f124e645263099132025256df8594ca0dc5cc83a (patch) | |
| tree | 07f0f99b99e55f431f71f4463aa912ab96405f61 /ws/sha1.ts | |
| parent | 4a97a6e67e93cdbcecde3d9b99092f15d3dfd803 (diff) | |
fix: eslint errors (denoland/deno_std#265)
Original: https://github.com/denoland/deno_std/commit/61af419bbc5717c2e2552050aacb20ef1b17480b
Diffstat (limited to 'ws/sha1.ts')
| -rw-r--r-- | ws/sha1.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ws/sha1.ts b/ws/sha1.ts index c30a1e6ac..d01df21ad 100644 --- a/ws/sha1.ts +++ b/ws/sha1.ts @@ -47,7 +47,7 @@ export class Sha1 { this._finalized = this._hashed = false; } - update(data: string | ArrayBuffer | ArrayBufferView) { + update(data: string | ArrayBuffer | ArrayBufferView): void { if (this._finalized) { return; } @@ -120,7 +120,7 @@ export class Sha1 { } } - finalize() { + finalize(): void { if (this._finalized) { return; } @@ -142,7 +142,7 @@ export class Sha1 { this.hash(); } - hash() { + hash(): void { let a = this._h0; let b = this._h1; let c = this._h2; @@ -271,7 +271,7 @@ export class Sha1 { this._h4 = (this._h4 + e) >>> 0; } - hex() { + hex(): string { this.finalize(); const h0 = this._h0; @@ -324,11 +324,11 @@ export class Sha1 { ); } - toString() { + toString(): string { return this.hex(); } - digest() { + digest(): number[] { this.finalize(); const h0 = this._h0; @@ -361,11 +361,11 @@ export class Sha1 { ]; } - array() { + array(): number[] { return this.digest(); } - arrayBuffer() { + arrayBuffer(): ArrayBuffer { this.finalize(); return Uint32Array.of(this._h0, this._h1, this._h2, this._h3, this._h4) .buffer; |
