twilio / twilio-node

Node.js helper library
MIT License
1.37k stars 497 forks source link

fix: Export values and all type information #914

Closed aaronhuggins-carewell closed 1 year ago

aaronhuggins-carewell commented 1 year ago

Fixes

For CommonJS exports, namespaces and functions can be merged. This allows the compiler to merge the function with value properties instead of manually assigning each one, while also exposing types at the top level of the module export.

Fixes #913

Checklist

If you have questions, please file a support ticket, or create a GitHub Issue in this repository.

aaronhuggins-carewell commented 1 year ago

I recognize that there are no tests, but actually testing type exports can be difficult and there's no obvious standard. Tell me how you'd like tests for type exports written and I'll happily add them.

Otherwise, from my perspective, assuming all tests pass in CI as they do locally, existing tests should validate the change.