From 356f96f77bb5eee1ef1d0f1192e6091a4915cfd9 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 18 Feb 2025 02:05:40 +0100 Subject: [PATCH] fix typeexport via rollup plugin by using the correct input The rollup plugin dts requires a d.ts tree as input not the txs sources. This change points the plugin into the right direction and removes the type export hacks. --- rollup.config.js | 4 ++-- src/index.tsx | 2 -- src/types/index.ts | 9 --------- 3 files changed, 2 insertions(+), 13 deletions(-) delete mode 100644 src/types/index.ts diff --git a/rollup.config.js b/rollup.config.js index 5f4a811b..5e64f969 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -76,7 +76,7 @@ export default [ ], }, { - input: 'src/index.tsx', + input: 'dist/types/src/index.d.ts', output: [{ file: 'dist/index.d.ts', format: 'es' }], plugins: [ aliasConfig, @@ -87,6 +87,6 @@ export default [ }, }), ], - external: [/\.css$/, /\.d\.ts$/], // ✅ `.d.ts` als extern behandeln + external: [/\.css$/, /\.d\.ts$/], }, ] diff --git a/src/index.tsx b/src/index.tsx index 1446e5a5..145d1719 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -37,8 +37,6 @@ export { } from './Components/Templates' export { TextInput, TextAreaInput, SelectBox } from './Components/Input' -export * from './types' - declare global { interface Window { my_modal_3: { diff --git a/src/types/index.ts b/src/types/index.ts deleted file mode 100644 index 42cb2117..00000000 --- a/src/types/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -export type { ItemsApi } from './ItemsApi' -export type { Tag } from './Tag' -export type { Item } from './Item' -export type { Permission } from './Permission' -export type { LayerProps } from './LayerProps' -export type { UserApi } from './UserApi' -export type { UserItem } from './UserItem' -export type { UtopiaMapProps } from './UtopiaMapProps' -export type { AssetsApi } from './AssetsApi'