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 · 3 comments
Open

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

dsherret opened this issue Dec 8, 2022 · 3 comments

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

@pakrym-stripe
Copy link
Contributor

This definitely something we are considering.

@bombillazo
Copy link

Any progress on this? Its becoming a hassle to use Stripe in our Deno app :/

@xavdid-stripe
Copy link
Member

There haven't been changes yet, but this is something we're prioritizing in 2025 (and ideally earlier rather than later).

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

4 participants