typescript: Migrate params-util.js to typescript.

This commit is contained in:
Priyank Patel
2019-06-19 20:59:43 -04:00
committed by Akash Nimare
parent 4d679acb0c
commit aa2c55538f
2 changed files with 5 additions and 7 deletions

View File

@@ -0,0 +1,11 @@
// This util function returns the page params if they're present else returns null
export function isPageParams(): null | object {
let webpageParams = null;
try {
// eslint-disable-next-line no-undef, @typescript-eslint/camelcase
webpageParams = page_params;
} catch (_) {
webpageParams = null;
}
return webpageParams;
}