[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] 12/13: tsc ask to export type from web-util
From: |
gnunet |
Subject: |
[taler-wallet-core] 12/13: tsc ask to export type from web-util |
Date: |
Fri, 21 Apr 2023 16:07:09 +0200 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository wallet-core.
commit 1ee962fbd8a250a185b56ea72b13da7830dc16e9
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Fri Apr 21 11:05:26 2023 -0300
tsc ask to export type from web-util
---
packages/web-util/src/stories.tsx | 8 +-------
packages/web-util/src/tests/hook.ts | 9 ++++++---
packages/web-util/tsconfig.json | 2 ++
3 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/packages/web-util/src/stories.tsx
b/packages/web-util/src/stories.tsx
index 3f90be13a..4edbf83b5 100644
--- a/packages/web-util/src/stories.tsx
+++ b/packages/web-util/src/stories.tsx
@@ -19,7 +19,6 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
import { setupI18n } from "@gnu-taler/taler-util";
-import e from "express";
import {
ComponentChild,
ComponentChildren,
@@ -32,6 +31,7 @@ import {
VNode,
} from "preact";
import { useEffect, useErrorBoundary, useState } from "preact/hooks";
+import { ExampleItemSetup } from "./tests/hook.js";
const Page: FunctionalComponent = ({ children }): VNode => {
return (
@@ -373,12 +373,6 @@ export interface ComponentItem<Props extends object = {}> {
examples: ExampleItem<Props>[];
}
-export type ExampleItemSetup<Props extends object = {}> = {
- component: FunctionalComponent<Props>;
- props: Props;
- contextProps: object;
-};
-
export interface ExampleItem<Props extends object = {}> {
group: string;
component: string;
diff --git a/packages/web-util/src/tests/hook.ts
b/packages/web-util/src/tests/hook.ts
index 58ac7d8c0..59f17ba8d 100644
--- a/packages/web-util/src/tests/hook.ts
+++ b/packages/web-util/src/tests/hook.ts
@@ -24,7 +24,6 @@ import {
render as renderIntoDom,
} from "preact";
import { render as renderToString } from "preact-render-to-string";
-import { ExampleItem, ExampleItemSetup } from "../stories.js";
// This library is expected to be included in testing environment only
// When doing tests we want the requestAnimationFrame to be as fast as
possible.
@@ -33,6 +32,12 @@ options.requestAnimationFrame = (fn: () => void) => {
return fn();
};
+export type ExampleItemSetup<Props extends object = {}> = {
+ component: FunctionalComponent<Props>;
+ props: Props;
+ contextProps: object;
+};
+
/**
*
* @param Component component to be tested
@@ -113,10 +118,8 @@ function renderHook(
type RecursiveState<S> = S | (() => RecursiveState<S>);
interface Mounted<T> {
- // unmount: () => void;
pullLastResultOrThrow: () => Exclude<T, VoidFunction>;
assertNoPendingUpdate: () => Promise<boolean>;
- // waitNextUpdate: (s?: string) => Promise<void>;
waitForStateUpdate: () => Promise<boolean>;
}
diff --git a/packages/web-util/tsconfig.json b/packages/web-util/tsconfig.json
index e2ac248aa..fc558e59b 100644
--- a/packages/web-util/tsconfig.json
+++ b/packages/web-util/tsconfig.json
@@ -1,6 +1,8 @@
{
"compilerOptions": {
"composite": true,
+ "declaration": true,
+ "declarationMap": false,
"target": "ES6",
"module": "ESNext",
"jsx": "react",
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-wallet-core] 01/13: better swr mocks, (continued)
- [taler-wallet-core] 01/13: better swr mocks, gnunet, 2023/04/21
- [taler-wallet-core] 03/13: test file end with -test.js, gnunet, 2023/04/21
- [taler-wallet-core] 04/13: running all tests in sequential mode, otherwise it will fail (maybe ava can't run in parallel?), gnunet, 2023/04/21
- [taler-wallet-core] 06/13: allow the example to add params to the testing context, gnunet, 2023/04/21
- [taler-wallet-core] 08/13: use better testing api, gnunet, 2023/04/21
- [taler-wallet-core] 05/13: fix bulid, gnunet, 2023/04/21
- [taler-wallet-core] 09/13: integrate anastasis to the web-utils testing api, gnunet, 2023/04/21
- [taler-wallet-core] 10/13: integrate to the web util testing api, gnunet, 2023/04/21
- [taler-wallet-core] 07/13: render hook and render ui are not the same function (node and browser), gnunet, 2023/04/21
- [taler-wallet-core] 13/13: props types should be exported for tests, gnunet, 2023/04/21
- [taler-wallet-core] 12/13: tsc ask to export type from web-util,
gnunet <=
- [taler-wallet-core] 11/13: remove old testing function, use web-utils, gnunet, 2023/04/21