-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
alpha: Core and Stock Feature constructors cannot be named when emitting declarations #6220
Description
TanStack Table version
v9.0.0-alpha23
Framework/Library version
React 18
Describe the bug and the steps to reproduce it
When creating table features and exporting them from a file, the typescript compiler will complain when declarations: true is set.
Example feature:
import {
columnOrderingFeature,
columnPinningFeature,
tableFeatures,
} from '@tanstack/table-core';
export const sharedTableFeatures = tableFeatures({
columnOrderingFeature,
columnPinningFeature,
});When declarations: true is set in the typescript compiler options, it throws an error that the refereces cannot be named (TS4023)
src/features.ts:7:14 - error TS4023: Exported variable 'sharedTableFeatures' has or is using name 'ColumnOrderingFeatureConstructors' from external module "/home/projects/vitejs-vite-rfnxush6/node_modules/@tanstack/table-core/dist/features/column-ordering/columnOrderingFeature" but cannot be named.
7 export const sharedTableFeatures = tableFeatures({
~~~~~~~~~~~~~~~~~~~
src/features.ts:7:14 - error TS4023: Exported variable 'sharedTableFeatures' has or is using name 'ColumnPinningFeatureConstructors' from external module "/home/projects/vitejs-vite-rfnxush6/node_modules/@tanstack/table-core/dist/features/column-pinning/columnPinningFeature" but cannot be named.
7 export const sharedTableFeatures = tableFeatures({
~~~~~~~~~~~~~~~~~~~
Found 2 errors.
This is most likely the case as the interfaces for the feature constructors on the alpha version are currently not exported (and also the actual member declarations are commented out).
My main question is, since this is an alpha build, if these interfaces are planned to be exposed and filled with the correct TableFeaeture constructor types.
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
https://stackblitz.com/edit/vitejs-vite-rfnxush6?file=src%2Ffeatures.ts
Screenshots or Videos (Optional)
No response
Do you intend to try to help solve this bug with your own PR?
Maybe, I'll investigate and start debugging
Terms & Code of Conduct
- I agree to follow this project's Code of Conduct
- I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.