aboutsummaryrefslogtreecommitdiff
path: root/packages/aml-backoffice-ui/src/forms/declaration.ts
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2024-04-23 11:31:56 -0300
committerSebastian <sebasjm@gmail.com>2024-04-23 11:31:56 -0300
commitcd590b18e856a128af3c31d9e7d4a621ea44024c (patch)
treeb20e8f4a446f4edddf364755032389d267beedb6 /packages/aml-backoffice-ui/src/forms/declaration.ts
parent2b8ae6381776b0d6fc9cc8c0b8275fbdc6d3295b (diff)
downloadwallet-core-cd590b18e856a128af3c31d9e7d4a621ea44024c.tar.xz
tidy up: some header missing
Diffstat (limited to 'packages/aml-backoffice-ui/src/forms/declaration.ts')
-rw-r--r--packages/aml-backoffice-ui/src/forms/declaration.ts36
1 files changed, 20 insertions, 16 deletions
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<T extends BaseForm> = {
- label: TranslatedString,
- id: string,
- version: number,
- impl: (current: T) => FlexibleForm<T>
-}
+ label: TranslatedString;
+ id: string;
+ version: number;
+ impl: (current: T) => FlexibleForm<T>;
+};
interface LabelValue {
label: TranslatedString;
- value: string,
+ value: string;
}
export interface UiForms {
- currencies: (i18n: InternationalizationAPI) => LabelValue[],
- languages: (i18n: InternationalizationAPI) => LabelValue[],
- forms: (i18n: InternationalizationAPI) => Array<FormMetadata<BaseForm>>,
+ currencies: (i18n: InternationalizationAPI) => LabelValue[];
+ languages: (i18n: InternationalizationAPI) => LabelValue[];
+ forms: (i18n: InternationalizationAPI) => Array<FormMetadata<BaseForm>>;
}
/**
@@ -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;