mrhenry / polyfill-library

MIT License
7 stars 1 forks source link

feat: add type definition #68

Closed adenvt closed 1 month ago

adenvt commented 2 months ago

Add type definition for typescript user

romainmenke commented 2 months ago

Hi @adenvt,

Thank you for your contribution 🎉

Personally I don't find it is maintainable to have a manual .d.ts file. I think that this places the highest burden on maintainers and provides the least value/assurances.

So I don't think we can accept this even if I appreciate your effort.


However I would consider a change that adds JSDoc type annotations.

Benefits of JSDOc annotations:

Stylelint for example uses such a setup : https://github.com/stylelint/stylelint

adenvt commented 2 months ago

@romainmenke Thank for reviewing.

I'm update it, and follow your approach to use JSDoc and generate .d.ts from it. I did: