-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
Wip/ts null checks #1568
Wip/ts null checks #1568
Conversation
Thanks for taking care of Calva quality! I need some help to understand the implications of the changes. I see that Is the plan to get rid of |
I now saw that you had mentioned this on slack and that it will just retain the current behaviour. That's cool. Baby steps. |
I don't see a reason to get rid of them, they're still useful in a few places where the code is checking if it's undefined. If we eventually remove all calls to the functions that can return undefined then sure.
It's mostly the same behavior. Let me give a few examples.
So it's mostly the same behavior as before but it's not impossible that it changes the behavior in some important way that I'm not aware of. |
7d58510
to
1c8edb5
Compare
Also, maintenance-wise, is it important to create an issue for these sorts of code quality improvements? |
Thanks! And thanks for taking your time to explain the implications to me. It all sounds perfect and wonderful to me. As I've mentioned before we have quite a lot of strange errors where there is very hard for users and us to try figure out what has actually gone wrong.
The important part is the changelog entry. When a users experiences a regression it is very handy with good descriptions on what has changed when. And that changelog should ideally be linked to somewhere where you can read more about it. The best place is usually the problem statement, so the issue. In this case you can link to this PR instead, if you like. |
This is great. I think I've seen errors about calling |
Co-authored-by: Brandon Ringe <brandon.ringe@gmail.com>
1fa1198
to
7552b79
Compare
I'm pretty sure this is ready to merge at this point? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! LGTM.
I left a nitpick about the changelog.
I still think muestGet
is not going to be as discoverable in the module API as something that begins with get
. In Clojure I would solve it with some symbol slapped to the end of the symbol name. but here I am out of better ideas.
It could be |
I like both suggestions. The latter is my favorite, I think. |
What has Changed?
Handled strict null checks for when we get the active text editor and for when we get the mirror doc.
My Calva PR Checklist
I have:
dev
branch. (Or have specific reasons to target some other branch.)published
. (Sorry for the nagging.)[Unreleased]
entry inCHANGELOG.md
, linking the issue(s) that the PR is addressing.ci/circleci: build
test.npm run prettier-format
)npm run eslint
before creating your PR, or runnpm run eslint-watch
to eslint as you go).