Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Skip assertDoc calls in production #3268
If we never
We might want to offload this kind of check to a type checker like flow or etc instead of taking the runtime hit (static type checking instead). But of course, adding flow could make things more overwhelming for new contributors. Not sure how often new contributors make changes to the doc printer though (I suspect rarely).
I'm not sure I understand this correctly. But if I did, I think we're not covered, since the case for
I was wondering what would be the downside of skipping the
I had to wrap each call with the if and add the replace in rollup build script to remove them from the dist file (optional but skips an
It's a bit ugly that bunch of ifs lying around but I think it's worth the benefit. We could change them with a
Let me know what you think!