Describe the bug
After the release in 4.8.0 I need use the import statement (http://tabulator.info/docs/4.8/upgrade), but when I use that with Typescript definition, I got error /node_modules/@types/tabulator-tables/index.d.ts' is not a module
Tabulator Info
Working Example
YOU MUST include a link to a JS Fiddle or Codepen that demonstrates the problem, it is very hard to diagnose an issue from a simple description.
Repo: https://github.com/angeliski/TypedTabulator
To Reproduce
A step by step guide to recreate the issue in your JS Fiddle or Codepen:
Expected behavior
The project compiles, running and Tabulator working fine
Desktop (please complete the following information):
System:
OS: Linux 4.15 Ubuntu 18.04.5 LTS (Bionic Beaver)
CPU: (4) x64 Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
Binaries:
Node: 12.18.3 - ~/.asdf/installs/nodejs/12.18.3/bin/node
Yarn: 1.21.1 - /usr/bin/yarn
npm: 6.14.6 - ~/.asdf/installs/nodejs/12.18.3/bin/npm
Browsers:
Chrome: 85.0.4183.102
Firefox: 80.0.1
Additional context
I will mark @Jojoshua here to help.
I tried to update the vue-tabulator, but got errors, so I need help here
Hey @angeliski
Im afraid we don't maintain the typescript definitions as part of this repo, that is @Jojoshua doman.
@Jojoshua How would you like to proceed now that Tabulator can be included both using require and import?
Cheers
Oli :)
@angeliski, as a temporary fix try adding export = Tabulator; to the bottom of @types\tabulator-tables\index.d.ts and see if it works
@angeliski pull latest of https://github.com/Jojoshua/TypedTabulator and also see if adding the index.d.ts to your project will fix it. This way existing codebases won't break.
https://github.com/Jojoshua/TypedTabulator/commit/cb60b56cdf0051f154caaa9498871bff370f2caf
Hey @olifolkerd I open the issue here because I didn't see any tip where open that, maybe we can add some instructions in the docs to handle issues about the Typescript definitions?
@Jojoshua seems to work to me, thanks for the help, maybe we can add that tip in the docs?
Hey @angeliski
The language page of the docs does point to the https://github.com/Jojoshua/TypedTabulator repo, but i will look at improving the help documentation to point people to the correct repos for the other framework/language support repos.
There is specifically no documentation on the site to cover TypeScripts because it is not part of the core library (the Language Documentation does direct typescript users to use it, and points them to @Jojoshua repo). I take exactly the same approach with the other framework supports for vue and react, i show people they are options and direct them to the respective sites/repos for those wrappers.
Im afraid i have enough on my plate managing the core library and the documentation without taking on the additional role of documenting and supporting the ever growing collection of excellent wrappers and companion repos that are available for Tabulator.
In fact not two weeks ago i launched the new https://github.com/olifolkerd/tabulator-ideas repo for members of the community to share their tabulator wrappers and projects with the community to help users find additional Tabulator related resources.
What i would say is you are not alone on the import issue, the move to supporting ES6 has resulted in all the wrapper package owners having to update their codebase to work with the updated import functionality, but this is no different to any other update, each one brings changes, deprecations or other tweaks that package owners have to work with. I am of course happy to work with each of the package owners on these issues and you will see that on a number of them i have contributed the necessary solutions, but only on their repos.
Cheers
Oli :)
Hey @olifolkerd
Makes really sense, thanks for explains
Maybe we can upgrade the Bug template to point to https://github.com/olifolkerd/tabulator-ideas to find the right repo to open issues,
No worries about the upgrade, I opened an issue here because I didn't find the right place, next time I will find the correct repo.
Thanks for the great work