Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(types): export types IdIdentifier, StringHeaderIdentifier, AccessorKeyColumnDefBase #5133

Merged
merged 1 commit into from Dec 20, 2023

Conversation

maxence-lefebvre
Copy link
Contributor

Hello, this is a short pull request to add some missing "export" clauses to some types.

Using a nx monorepo, one of my buildable modules fails to build with the following errors:

TS4023: Exported variable 'myHook' has or is using name 'AccessorKeyColumnDefBase' from external module ".../node_modules/@tanstack/table-core/build/lib/types" but cannot be named. 

TS4023: Exported variable 'myHook' has or is using name 'IdIdentifier' from external module ".../node_modules/@tanstack/table-core/build/lib/types" but cannot be named.

TS4023: Exported variable 'myHook' has or is using name 'StringHeaderIdentifier' from external module ".../node_modules/@tanstack/table-core/build/lib/types" but cannot be named.

I have yarn linked react-table and table-core, and it resolved my build issues.

Thank you for considering this issue, and I hope you find this helpful.

…orKeyColumnDefBase

fixes those build issues:
TS4023: Exported variable 'myHook' has or is using name 'AccessorKeyColumnDefBase' from external module ".../node_modules/@tanstack/table-core/build/lib/types" but cannot be named.
TS4023: Exported variable 'myHook' has or is using name 'IdIdentifier' from external module ".../node_modules/@tanstack/table-core/build/lib/types" but cannot be named.
TS4023: Exported variable 'myHook' has or is using name 'StringHeaderIdentifier' from external module ".../node_modules/@tanstack/table-core/build/lib/types" but cannot be named.
@C-Higgins
Copy link

C-Higgins commented Oct 19, 2023

I am also seeing this issue when exporting an array of columns. It only happens when the array is exported and there are two or more different string-extending types, such as a string and a string|null, or a string and a string literal. Minimal reproduction:

const cd = createColumnHelper<{a: 'a'; b:string}>();
export const cols = [
  cd.accessor("a", {}),
  cd.accessor("b", {}),
];

@72gm
Copy link

72gm commented Oct 20, 2023

Started doing some refactoring and moved my column helpers into their own file, added export and now getting exactly the same issue!

@72gm
Copy link

72gm commented Oct 23, 2023

@maxence-lefebvre is there any ETA on this getting to production?

@yarinsa
Copy link

yarinsa commented Dec 1, 2023

Any chance to merge this fix? @maxence-lefebvre

@maxence-lefebvre
Copy link
Contributor Author

Any chance to merge this fix? @maxence-lefebvre

I am not a contributor and am therefore not allowed to merge on this repository 😄

Thanks

@Talent30
Copy link

@tannerlinsley Could you review this please?

@KevinVandy KevinVandy merged commit 83e2c37 into TanStack:main Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants