-
Notifications
You must be signed in to change notification settings - Fork 131
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 #363
Comments
As a workaround I'm using:
But I'm agree that it would be much helpful to have exported types in root. |
I would like to see this as well. In my case I am using the custom card integration (secured fields) and I wanted to make it more robust by using TypeScript. I tried mapping function signatures manually for functions like |
I'm looking for this as well. |
We used this workaround too. Though probably an update somewhere in our build system 'broke' this method because the types aren't in the 'exports' of the package. Which probably has something to do with Typescript not completely adhering to ESM module specifications (yet). We're now getting the following error in our project with Vue 3 using Vite:
Which is pretty much the same as this issue in the vite repository: vitejs/vite#7749. |
Up.It would actually be very useful to be able to import types via npm! I'm using the library as an embedded script so there is no way to access types in the code at the moment in any way. |
Up. I would love to import types easily. For now, I am using: import type { CoreOptions } from "@adyen/adyen-web/dist/types/core/types";
import type { DropinElementProps } from "@adyen/adyen-web/dist/types/components/Dropin/types"; But it would be much better to import just from the I've just prepared a very simple PR addressing this issue: #2294 |
Hi all! A BETA version of Web v6 is now available on Github. Feel free to take a look and give us feedback! We aim to release the official v6 in the coming weeks. More information can be found here. |
Hey guys, We just released the v6.0.0 which has better support for Typescript types. It is now possible to import types directly from the root ( Ex: |
It would make sense for Typescript projects also export typings such as
CoreOptions
.The text was updated successfully, but these errors were encountered: