tabulator-tables: add export statement#34756
tabulator-tables: add export statement#34756hados99 wants to merge 3 commits intoDefinitelyTyped:masterfrom
Conversation
|
@hados99 Thank you for submitting this PR! 🔔 @Jojoshua - please review this PR in the next few days. Be sure to explicitly select If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead. |
Jojoshua
left a comment
There was a problem hiding this comment.
Adding the default export breaks existing code and should not be necessary. If you add this to your @ types then there should be no problem using it. Maybe if you had an explanation of what you couldn't get to work would be helpful.
|
@hados99 One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits or comments. Thank you! |
|
Thanks for comments. I made pr because I have problem when loading definition as below my env is typescript 3.3, 3.4 and tslint 5.13.1. |
|
I already configured typesRoot.
but I faced loading definition error only @types/tabulator-tables
|
|
Are you trying to create a new instance of Tabulator? Try to use it like the tests do. I looked at one of the index.d.ts definitions you were using from jest and it doesn't have an export default in it either. |
how about change |
|
I can't see adding this because it breaks existing users. The issue you are having isn't well defined. Maybe someone from the TS team can help. |
|
I'll find different way |
|
@hados99 I have the same issue. Please let me know when you know how. Thank you. |
|
@minyoungyang |
|
@hados99 Thank you. I'll do it right now. |
|
@hados99 @minyoung You guys might try the solution here olifolkerd/tabulator#86 (comment) Basically add tabulator-types to your types section and then require tabulator like so... This solved the issue in a vue project that was similar to yours.
|
|
@Jojoshua Thanks for your contribution. However, after I imported tabulator by using Here is my tsconfig: |
I encountered definition loading error, so I added
export defaultstatements.and also modified tests as below
This pr is about #34682, but I have some git branch problem, so I made new pr
I really hope this pr to be accepted.
Thanks.
npm test.)npm run lint package-name(ortscif notslint.jsonis present).Select one of these and delete the others:
If adding a new definition:
.d.tsfiles generated via--declarationdts-gen --dt, not by basing it on an existing project.tslint.jsonshould be present, andtsconfig.jsonshould havenoImplicitAny,noImplicitThis,strictNullChecks, andstrictFunctionTypesset totrue.If changing an existing definition:
tslint.jsoncontaining{ "extends": "dtslint/dt.json" }.If removing a declaration:
notNeededPackages.json.