diff --git a/src/htmlUtils.ts b/src/htmlUtils.ts index a45ca1c..e0eec93 100644 --- a/src/htmlUtils.ts +++ b/src/htmlUtils.ts @@ -44,7 +44,7 @@ interface ElementInfo { [propName: string]: any; } -export function makeElement(elementInfo: ElementInfo) { +export function makeElement(elementInfo: ElementInfo): HTMLElement { if ("condition" in elementInfo) { if (!elementInfo.condition) { return null; } } const element = document.createElement(elementInfo.tag); @@ -57,7 +57,7 @@ export function makeElement(elementInfo: ElementInfo) { return element; } -export function setElementAttributes(element: Element, attributes: {[propName: string]: any}) { +export function setElementAttributes(element: Element, attributes: {[propName: string]: any}): void { for (const key of Object.getOwnPropertyNames(attributes)) { element.setAttribute(key, attributes[key]); } diff --git a/src/pages/KeyValue/KeyValueView.ts b/src/pages/KeyValue/KeyValueView.ts index d563636..af129fa 100644 --- a/src/pages/KeyValue/KeyValueView.ts +++ b/src/pages/KeyValue/KeyValueView.ts @@ -24,7 +24,7 @@ export class KeyValueViewPage extends Page { setTitleElement(pageState); - let kvViewPageContent = makeElement({ tag: "div" }); + const kvViewPageContent = makeElement({ tag: "div" }); setPageContent(kvViewPageContent); if (pageState.currentMountType == "cubbyhole") { @@ -34,7 +34,7 @@ export class KeyValueViewPage extends Page { })); } - let newButton = makeElement({ + const newButton = makeElement({ tag: "button", text: i18next.t("kv_view_new_btn"), class: ["uk-button", "uk-button-primary", "uk-margin-bottom"], @@ -45,7 +45,7 @@ export class KeyValueViewPage extends Page { kvViewPageContent.appendChild(newButton); try { - let res = await getSecrets( + const res = await getSecrets( pageState.currentBaseMount, pageState.currentMountType, pageState.currentSecretPath, diff --git a/src/types/Page.ts b/src/types/Page.ts index 6f905a9..2e60583 100644 --- a/src/types/Page.ts +++ b/src/types/Page.ts @@ -15,8 +15,8 @@ export class Page { } goBack(): void { changePage("HOME"); - }; + } cleanup(): void { // Do Nothing - }; + } } \ No newline at end of file