Skip to content

Commit 78efcf9

Browse files
YKDZweb-flow
andauthored
fix: export missing shared types to prevent TS2742 in consumer projects (#2586)
Types like `DataOrientation`, `Direction`, `StringOrNumber`, etc. are used in public component prop interfaces (e.g. `SeparatorProps`, `TabsRootProps`) but were not re-exported from the main `index.ts` entry point. The bundler's chunk splitting placed them in an internal chunk (`index3`), which is not listed in the package `exports` map. This caused TS2742 errors in consumer projects using `vue-tsc` with `declaration: true`: error TS2742: The inferred type of '__VLS_export' cannot be named without a reference to 'reka-ui/dist/index3'. This is likely not portable. Re-exporting these types from `src/index.ts` ensures they are included in the main `index.d.ts` declaration file, making them resolvable without referencing internal chunks. Co-authored-by: YKDZ <noreply@github.com>
1 parent 9ad6ec0 commit 78efcf9

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

packages/core/src/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,14 @@ export {
9696
} from './shared/color'
9797
export {
9898
type AcceptableValue,
99+
type DataOrientation,
100+
type Direction,
101+
type FormFieldProps,
99102
type GenericComponentInstance,
103+
type ScrollBodyOption,
104+
type SingleOrMultipleProps,
105+
type SingleOrMultipleType,
106+
type StringOrNumber,
100107
} from './shared/types'
101108
export * from './Slider'
102109
export * from './Splitter'

0 commit comments

Comments
 (0)