chore: fix exports for types (#630)
I’m trying to update Argo Workflows to pull in the changes from https://github.com/argoproj/argo-ui/pull/614, but Webpack gives a lot of warnings like this:
WARNING in ./node_modules/argo-ui/src/components/index.ts 32:0-49:23 export 'FormApi' (reexported as 'FormApi') was not found in './form/compat' (possible exports: Checkbox, Form, FormField, NestedForm, Text, TextArea) @ ./node_modules/argo-ui/src/index.ts 2:0-29 2:0-29 @ ./src/cron-workflows/cron-workflow-row.tsx 1:0-43 22:2028-2034 @ ./src/cron-workflows/cron-workflow-list.tsx 42:0-54 133:8-23 @ ./src/cron-workflows/cron-workflow-container.tsx 4:0-56 5:208-224 @ ./src/cron-workflows/index.ts 1:0-66 3:13-34 @ ./src/app-router.tsx 25:0-45 164:1125-1148 @ ./src/app.tsx 6:0-41 18:119-128 @ ./src/index.tsx 4:0-28 8:48-51I think this is happening because
FormApiis a type, so we should be using a type-only export. To prevent this from happening again, I enabled isolatedModules sotscwill give an error like this:src/components/index.ts:49:5 - error TS1205: Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'. 49 ValidateValuesFunction, ~~~~~~~~~~~~~~~~~~~~~~Signed-off-by: Mason Malone 651224+MasonM@users.noreply.github.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
Argo UI Components
Set of React components used by Argo Workflows, Argo CD, and Argo Rollouts.
Build & Run
pnpm installpnpm start- starts the Storybook v8 dev serverLocal Development
To test your changes locally against Argo CD or another Argo project, we recommend using
yalc.First, install
yalc:Next, in your local
argo-uidirectory, runFinally, in your local
argo-cd/uidirectory, runYour local changes to the
argo-uipackage will now be seen by your localargo-cd.