Using Yuno SDK Types
This package provides TypeScript types for integrating the Yuno SDK into your application. You can use the types in two ways: importing them explicitly or using them globally.
To make the types available globally across your project, include them in your tsconfig.json
file:
{
"compilerOptions": {
"types": ["@yuno-payments/sdk-web-types/dist/global"]
}
}
If you prefer to import specific types explicitly, you can do so like this:
import { YunoInstance } from '@yuno-payments/sdk-web-types'
const yunoInstance: YunoInstance = Yuno.initialize('publicApiKey')
By including "types": ["@yuno-payments/sdk-web-types/dist/global"]
in your tsconfig.json
, you ensure that global types (like Yuno
) are available across your project without the need to import them explicitly.
- To use explicit types, import the specific types you need from
@yuno-payments/sdk-web-types
. - To use
Yuno
globally, include the configuration intsconfig.json
to makeYuno
available throughout your project without importing it.
With this setup, your Yuno SDK integration will be smooth, and TypeScript's type checking and autocompletion will help you ensure correctness in your code.