You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the parameter --inline-declare-externals, the produced declare module statement can miss some imports if the statement includes types that extend another type.
// RowData is importedimport{RowData}from'@tanstack/react-table';declare module "@tanstack/table-core"{interfaceTableMeta<TDataextendsRowData>{stickyFilters?: boolean;}}
Actual output
// RowData is not importeddeclare module "@tanstack/table-core"{interfaceTableMeta<TDataextendsRowData>{stickyFilters?: boolean;}}
Additional context
When building, these errors appear:
node_modules/@tanstack/table-core/build/lib/types.d.ts(17,18): error TS2428: All declarations of 'TableMeta' must have identical type parameters.
ReactTable.d.ts(7,12): error TS2428: All declarations of 'TableMeta' must have identical type parameters.
ReactTable.d.ts(7,36): error TS2304: Cannot find name 'RowData'.
I made a small repository to reproduce the issue. It can be found from here.
Thank you for your time in advance!
The text was updated successfully, but these errors were encountered:
A note for myself (or anyone who's concerned) about the issue: currently the tool uses only root file exports to detect whether a type/value is used or not and thus whether it should be added to the bundle (via either way e.g. importing or inlining). With --inline-declare-externals we need to consider all these "declare externals" as well (it might be tricky tho as collecting a list of such externals is done at the same time as processing all files, so we might need to split this into 2 phases).
Bug report
When using the parameter
--inline-declare-externals
, the produceddeclare module
statement can miss some imports if the statement includes types that extend another type.Input code
Expected output
Actual output
Additional context
When building, these errors appear:
I made a small repository to reproduce the issue. It can be found from here.
Thank you for your time in advance!
The text was updated successfully, but these errors were encountered: