Conform more of the codebase to strictNullChecks
(#10738)
This commit is contained in:
parent
5e8488c283
commit
52017f62e1
18 changed files with 105 additions and 84 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue