- Preparing search index...
- The search index is not available
tonconnect
Interface EventDispatcher<T>
Type Parameters
-
T extends {
type: string;
}
Methods
addEventListener
- addEventListener<P>(eventName: P, listener: ((event: CustomEvent<T & {
type: RemoveTonConnectPrefix<P>;
}>) => void), options?: AddEventListenerOptions): Promise<(() => void)>
-
Type Parameters
-
P extends `ton-connect-${string}` | `ton-connect-ui-${string}`
Parameters
-
eventName: P
-
listener: ((event: CustomEvent<T & {
type: RemoveTonConnectPrefix<P>;
}>) => void)
-
Optional
options: AddEventListenerOptions
Returns Promise<(() => void)>
dispatchEvent
- dispatchEvent<P>(eventName: P, eventDetails: T & {
type: RemoveTonConnectPrefix<P>;
}): Promise<void>
-
Type Parameters
-
P extends `ton-connect-${string}` | `ton-connect-ui-${string}`
Returns Promise<void>
Interface for an event dispatcher that sends events.