fix(core): Update types for TypeScript nullability support (#15472)

This commit is contained in:
Miško Hevery
2017-03-29 09:34:45 -07:00
committed by Victor Berchet
parent 331b9f6425
commit 910c0d9ee7
84 changed files with 1287 additions and 1260 deletions

View File

@ -35,7 +35,7 @@ export function getStringParameter(name: string) {
}
export function bindAction(selector: string, callback: () => void) {
document.querySelector(selector).addEventListener('click', callback);
document.querySelector(selector) !.addEventListener('click', callback);
}
@ -60,7 +60,7 @@ export function profile(create: () => void, destroy: () => void, name: string) {
function urlParamsToForm() {
const regex = /(\w+)=(\w+)/g;
const search = decodeURIComponent(location.search);
let match: any[];
let match: any[]|null;
while (match = regex.exec(search)) {
const name = match[1];
const value = match[2];
@ -75,4 +75,4 @@ function urlParamsToForm() {
}
}
}
}
}