Skip to content

Commit 6b0c439

Browse files
authored
fix hash.ts typings (#237464)
1 parent b0d6d34 commit 6b0c439

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/vs/base/common/hash.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ function objectHash(obj: any, initialHashVal: number): number {
6969
}, initialHashVal);
7070
}
7171

72+
// this is shared global between browsers and nodejs
73+
declare const crypto: {
74+
subtle: {
75+
digest(a: string, b: ArrayBufferView): Promise<ArrayBuffer>;
76+
};
77+
};
78+
7279
/** Hashes the input as SHA-1, returning a hex-encoded string. */
7380
export const hashAsync = (input: string | ArrayBufferView | VSBuffer) => {
7481
// Note: I would very much like to expose a streaming interface for hashing

0 commit comments

Comments
 (0)