Conform more of the codebase to strictNullChecks (#10738)
This commit is contained in:
committed by
GitHub
parent
5e8488c283
commit
52017f62e1
@@ -77,12 +77,11 @@ export function formatCryptoKey(key: string): string {
|
||||
*/
|
||||
export function hashCode(str: string): number {
|
||||
let hash = 0;
|
||||
let i;
|
||||
let chr;
|
||||
let chr: number;
|
||||
if (str.length === 0) {
|
||||
return hash;
|
||||
}
|
||||
for (i = 0; i < str.length; i++) {
|
||||
for (let i = 0; i < str.length; i++) {
|
||||
chr = str.charCodeAt(i);
|
||||
hash = (hash << 5) - hash + chr;
|
||||
hash |= 0;
|
||||
|
||||
Reference in New Issue
Block a user