-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Exposing useful types in Typesense.ts #116
base: master
Are you sure you want to change the base?
Conversation
- Adding ts-eslint - Adding es-link option to use import type (prevents types to end up in bundle)
For context please follow this slack conversation: https://typesense-community.slack.com/archives/C01P749MET0/p1647516018829819 Regarding the namespace I was thinking about the same but then I came across this part of the manual: https://www.typescriptlang.org/docs/handbook/modules.html#export-as-close-to-top-level-as-possible It probably wouldn't make sense to group them all under "types" or something but splitting them up into logical units (Documents, etc.) is probably to much. I also auto-completion in webstorm can't handle it properly, if I try to auto-import this type: RequestUnauthorized from Errors, it imports it from the lib-path and not from "typesene". Also the user always has the option to do the following:
Regarding the unchanged files popping up in the PR: I don't know, I haven't changed any modes of any file etc.. I just ran eslint --fix . on enverything. Could there be an eslint rule that forces some kind of mode onto the files? EDIT: Regarding the constructor error messages: I disabled that rule. Eslint is quite opinionated EDIT2: Yes it was a line ending issue:
Unknowingly I converted them all to LF. You can check using this option from git: Here is some document on how to prevent that:: |
Sounds good.
👍 re: line-ending issue, good to know! I'm on on a mac, and I think some past contributors were using Windows. For the purposes of keeping this PR clean and easy to parse the true diff, mind disabling and reverting the line endings change? I'll take care of standardizing it separately. |
Change Summary
These are my suggestions for the things we discussed in slack. The tests are currently failing because of ts-eslint and all the typescript errors.
What are your thoughts?
PR Checklist