@tiun/types
v0.2.0
Published
TypeScript type definitions for tiun SDK (for script tag users)
Downloads
394
Maintainers
Readme
@tiun/types
TypeScript type definitions for the tiun SDK.
Types are included in @tiun/sdk; you do not need this package when using the SDK. This package is an optional standalone reference (e.g. for custom setups).
Installation
npm install @tiun/types --save-devSetup
Add to tsconfig.json:
{
"compilerOptions": {
"types": ["@tiun/types"]
}
}Or in any .d.ts file:
/// <reference types="@tiun/types" />Usage
The global tiun object is typed:
tiun.init({ snippetId: 'your-snippet-id' });
tiun.on('paywallShow', ({ isConnected }) => {});
tiun.checkout({ productId: 'prod_123' });Auto-generated
This package is auto-generated from src/sdk/types.ts.
License
MIT
