UNPKG

@revenuecat/purchases-ui-js

Version:

Web components for Paywalls. Powered by RevenueCat

19 lines (18 loc) 1.15 kB
import { SvelteComponent } from "svelte"; import type { Component } from "../../types/component"; interface Props { nodeData: Component; } declare const Node: import("svelte").Component<Props, { /** * This function returns the component class and the node data for a given paywall component. * It first checks if the component type is supported and returns the corresponding component class. * If not supported, it checks if the fallback component type is supported and returns the corresponding component class, * finally it throws an error if the component type is not supported and the fallback component type is not supported. * @param nodeData:Component - the Component object representing a Node in the paywall * @returns [Component<SupportedComponents>, Component] - a tuple containing the component class and the node data * @throws Error - if the component type and the fallback component type are not supported */ getComponentClass: (nodeData: Component) => [SvelteComponent<Component>, Component] | undefined; }, "">; type Node = ReturnType<typeof Node>; export default Node;