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

feat: export types from Adyen Web #2294

Closed
wants to merge 1 commit into from
Closed

feat: export types from Adyen Web #2294

wants to merge 1 commit into from

Conversation

Fifciu
Copy link

@Fifciu Fifciu commented Aug 11, 2023

Summary

This PR simply exports every type from types directory to make it available for consumers. I haven't had chance to test it manually.

Expected behavior

I am able to:

import type { CoreOptions } from "@adyen/adyen-web";
import type { DropinElementProps } from "@adyen/adyen-web";

Instead of:

import type { CoreOptions } from "@adyen/adyen-web/dist/types/core/types";
import type { DropinElementProps } from "@adyen/adyen-web/dist/types/components/Dropin/types";

Fixed issue: #363

@ribeiroguilherme
Copy link
Contributor

Hey @Fifciu ,

Thanks for contributing to your repo.

Unfortunately this won't work. The exposure of the Typescript types is done during the build step which we use tsc to emit the types, which are placed in the types folder. I know that currently it is a bit annoying to import the Type relying on the folder structure, and ideally you would import from the root level.

The good news is that this change is something that we are aiming for the next major release v6, which should take place in the upcoming months. We don't have a strict deadline yet, but we are aiming for the end of this year. So keep an eye on the repo 👍

Cheers!

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

Successfully merging this pull request may close these issues.

None yet

2 participants