UNPKG

@exadel/esl

Version:

Exadel Smart Library (ESL) is the lightweight custom elements library that provide a set of super-flexible components

18 lines (17 loc) 850 B
import type { ESLShareButton } from './esl-share-button'; /** Action type definition */ export type ESLShareActionType = (new () => ESLShareBaseAction) & typeof ESLShareBaseAction; /** Base action class/interface for actions that ESLShare widgets can invoke. */ export declare abstract class ESLShareBaseAction { static readonly is: string; /** Decorator to register action */ static register(this: ESLShareActionType): void; /** Registers this action */ static register(this: unknown, action?: ESLShareActionType): void; /** Checks if this action is available on the user's device */ get isAvailable(): boolean; /** @returns {@link ShareData} object for button */ protected getShareData($button: ESLShareButton): ShareData; /** Does an action to share */ abstract share($button: ESLShareButton): void; }