commit e38a017a7ccede04acd8f04e20cfde0953c6b8e6
parent 31eb21ff00db0f39cbf89a139e3897050311007e
Author: Florian Dold <dold@taler.net>
Date: Fri, 4 Sep 2026 21:33:55 +0200
bank web UI: annotate exports to make TypeDoc happy
Diffstat:
2 files changed, 45 insertions(+), 31 deletions(-)
diff --git a/packages/libeufin-bank-webui/src/pages/account/MerchantIntegration.stories.tsx b/packages/libeufin-bank-webui/src/pages/account/MerchantIntegration.stories.tsx
@@ -29,22 +29,29 @@ const routeMyAccountPassword = urlPattern(
);
const routeOverview = urlPattern(/^\/account$/, () => "#/account");
-export const TalerBankAccount = tests.createExample(MerchantIntegrationView, {
- account: "alice",
- accountData: {
- name: "Alice Example",
- balance: {
- amount: "ASR:42",
- credit_debit_indicator: "credit",
- },
- payto_uri: "payto://x-taler-bank/bank.example/alice",
- debit_threshold: "ASR:10",
- is_public: false,
- is_taler_exchange: false,
- status: "active",
- } as any,
- routeOverview,
- routeMyAccountDetails,
- routeMyAccountMerchantIntegration,
- routeMyAccountPassword,
-});
+type MerchantIntegrationExample = tests.ExampleItemSetup<
+ Parameters<typeof MerchantIntegrationView>[0]
+>;
+
+export const TalerBankAccount: MerchantIntegrationExample = tests.createExample(
+ MerchantIntegrationView,
+ {
+ account: "alice",
+ accountData: {
+ name: "Alice Example",
+ balance: {
+ amount: "ASR:42",
+ credit_debit_indicator: "credit",
+ },
+ payto_uri: "payto://x-taler-bank/bank.example/alice",
+ debit_threshold: "ASR:10",
+ is_public: false,
+ is_taler_exchange: false,
+ status: "active",
+ } as any,
+ routeOverview,
+ routeMyAccountDetails,
+ routeMyAccountMerchantIntegration,
+ routeMyAccountPassword,
+ },
+);
diff --git a/packages/libeufin-bank-webui/src/pages/admin/AccountForm.stories.tsx b/packages/libeufin-bank-webui/src/pages/admin/AccountForm.stories.tsx
@@ -18,7 +18,11 @@ export default {
title: "account form",
};
-export const Create = tests.createExample(AccountForm, {
+type AccountFormExample = tests.ExampleItemSetup<
+ Parameters<typeof AccountForm>[0]
+>;
+
+export const Create: AccountFormExample = tests.createExample(AccountForm, {
template: undefined,
purpose: "create",
onChange: () => undefined,
@@ -39,7 +43,7 @@ const accountTemplate = {
tan_channels: ["email", "sms"],
} as any;
-export const Update = tests.createExample(AccountForm, {
+export const Update: AccountFormExample = tests.createExample(AccountForm, {
template: accountTemplate,
username: "alice",
purpose: "update",
@@ -47,16 +51,19 @@ export const Update = tests.createExample(AccountForm, {
children: undefined,
});
-export const UpdateEditableFieldsOnly = tests.createExample(AccountForm, {
- template: accountTemplate,
- username: "alice",
- purpose: "update",
- hideNonEditableFields: true,
- onChange: () => undefined,
- children: undefined,
-});
+export const UpdateEditableFieldsOnly: AccountFormExample = tests.createExample(
+ AccountForm,
+ {
+ template: accountTemplate,
+ username: "alice",
+ purpose: "update",
+ hideNonEditableFields: true,
+ onChange: () => undefined,
+ children: undefined,
+ },
+);
-export const Show = tests.createExample(AccountForm, {
+export const Show: AccountFormExample = tests.createExample(AccountForm, {
template: accountTemplate,
username: "alice",
purpose: "show",
@@ -64,7 +71,7 @@ export const Show = tests.createExample(AccountForm, {
children: undefined,
});
-export const AdministratorCreate = tests.createExample(
+export const AdministratorCreate: AccountFormExample = tests.createExample(
AccountForm,
{
template: undefined,