ionic-team / capacitor-docgen

Docs Readme Markdown and JSON Generator for Capacitor Plugins.
https://capacitorjs.com/
Other
12 stars 8 forks source link

Cleanup #10

Closed aparajita closed 3 years ago

aparajita commented 3 years ago

Cleaned up various issues pointed out by WebStorm.

adamdbradley commented 3 years ago

I think it's fine to double check the input is of the string type, as with JS they could pass anything. Sure it's unlikely, but I don't see a reason to go out of our way and remove checks like this.

aparajita commented 3 years ago

I think it's fine to double check the input is of the string type, as with JS they could pass anything.

By that reasoning you should be type checking every argument. Just saying...

aparajita commented 3 years ago

And @adamdbradley if you look at my conversation with Dan, I checked the source of those parameters and they are not external and thus could not be anything but strings.

aparajita commented 3 years ago

Okay @adamdbradley and @dwieeb, this is my last word on this.

TypeScript 101:

Believe it or not, I took the time — my unpaid time — to think it through and check carefully if there was any possibility of this being a breaking change before I submitted the PR. Casually dismissing it is a perfect way to discourage further contributions.