From cd590b18e856a128af3c31d9e7d4a621ea44024c Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 23 Apr 2024 11:31:56 -0300 Subject: tidy up: some header missing --- .../aml-backoffice-ui/src/forms/declaration.ts | 36 ++++++++++++---------- 1 file changed, 20 insertions(+), 16 deletions(-) (limited to 'packages/aml-backoffice-ui/src/forms/declaration.ts') diff --git a/packages/aml-backoffice-ui/src/forms/declaration.ts b/packages/aml-backoffice-ui/src/forms/declaration.ts index ec3bc5189..d944a7a53 100644 --- a/packages/aml-backoffice-ui/src/forms/declaration.ts +++ b/packages/aml-backoffice-ui/src/forms/declaration.ts @@ -15,17 +15,20 @@ */ import type { AmountJson, TranslatedString } from "@gnu-taler/taler-util"; -import type { FlexibleForm, InternationalizationAPI } from "@gnu-taler/web-util/browser"; +import type { + FlexibleForm, + InternationalizationAPI, +} from "@gnu-taler/web-util/browser"; import { AmlExchangeBackend } from "../utils/types.js"; /** * import entry point without hard reference. - * - * This file just export types and UI Forms + * + * This file just export types and UI Forms * based on what `globalThis` contains. - * - * `./index.js` must be imported first before - * so `globaThis` will have the correct value. + * + * `./index.js` must be imported first before + * so `globaThis` will have the correct value. */ export interface BaseForm { @@ -34,21 +37,21 @@ export interface BaseForm { } export type FormMetadata = { - label: TranslatedString, - id: string, - version: number, - impl: (current: T) => FlexibleForm -} + label: TranslatedString; + id: string; + version: number; + impl: (current: T) => FlexibleForm; +}; interface LabelValue { label: TranslatedString; - value: string, + value: string; } export interface UiForms { - currencies: (i18n: InternationalizationAPI) => LabelValue[], - languages: (i18n: InternationalizationAPI) => LabelValue[], - forms: (i18n: InternationalizationAPI) => Array>, + currencies: (i18n: InternationalizationAPI) => LabelValue[]; + languages: (i18n: InternationalizationAPI) => LabelValue[]; + forms: (i18n: InternationalizationAPI) => Array>; } /** @@ -61,10 +64,11 @@ const defaultUIForms: UiForms = { }; declare global { + // eslint-disable-next-line no-var var amlExchangeBackoffice: UiForms; } export const uiForms: UiForms = "amlExchangeBackoffice" in globalThis - ? (globalThis as any).amlExchangeBackoffice + ? globalThis.amlExchangeBackoffice : defaultUIForms; -- cgit v1.2.3