diff options
author | Sebastian <sebasjm@gmail.com> | 2022-10-14 11:40:38 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-10-14 11:41:53 -0300 |
commit | da9ec5eb16298d8ca5690800eca1c15f5a6cfaa5 (patch) | |
tree | 56b637054c94462cada2a067cfb7cce46fefe651 /packages/taler-wallet-webextension/src/test-utils.ts | |
parent | ca8da4ed380b308abdc894145c7e1a102bfd6cf0 (diff) | |
download | wallet-core-da9ec5eb16298d8ca5690800eca1c15f5a6cfaa5.tar.xz |
refactored terms of service to remove duplicated code
prettfied some sources
Diffstat (limited to 'packages/taler-wallet-webextension/src/test-utils.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/test-utils.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/taler-wallet-webextension/src/test-utils.ts b/packages/taler-wallet-webextension/src/test-utils.ts index 7e9c5670e..e2339bff3 100644 --- a/packages/taler-wallet-webextension/src/test-utils.ts +++ b/packages/taler-wallet-webextension/src/test-utils.ts @@ -82,7 +82,7 @@ export function renderNodeOrBrowser(Component: any, args: any): void { document.body.removeChild(div); } } -type RecursiveState<S> = S | (() => RecursiveState<S>) +type RecursiveState<S> = S | (() => RecursiveState<S>); interface Mounted<T> { unmount: () => void; @@ -107,12 +107,12 @@ export function mountHook<T extends object>( // component that's going to hold the hook function Component(): VNode { try { - let componentOrResult = callback() + let componentOrResult = callback(); while (typeof componentOrResult === "function") { componentOrResult = componentOrResult(); } //typecheck fails here - const l: Exclude<T, () => void> = componentOrResult as any + const l: Exclude<T, () => void> = componentOrResult as any; lastResult = l; } catch (e) { if (e instanceof Error) { |