Skip to content
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

Consider switching away from defining types with an ambient module #1636

Open
dsherret opened this issue Dec 8, 2022 · 1 comment
Open

Comments

@dsherret
Copy link

dsherret commented Dec 8, 2022

Is your feature request related to a problem? Please describe.

Right now, stripe defines its types with an amient module like so:

declare module 'stripe' {

This is not ideal because stripe might not always be imported with the module specifier as "stripe". For example, someone might be importing it via a url or alias the stripe package. Essentially by using an ambient module, the code is declaring a global module specifier "stripe" rather than being the types that are exported from the package.

Describe the solution you'd like

Instead, export the declarations from ./types/index.d.ts

Describe alternatives you've considered

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants