UNPKG

@dataunlocker/defender-svelte

Version:

DataUnlocker Defender for Svelte applications.

46 lines (45 loc) 2.08 kB
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> { new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & { $$bindings?: Bindings; } & Exports; (internal: unknown, props: Props & { $$events?: Events; $$slots?: Slots; }): Exports & { $set?: any; $on?: any; }; z_$$bindings?: Bindings; } type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends { default: any; } ? Props extends Record<string, never> ? any : { children?: any; } : {}); declare const Defender: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{ /** * DataUnlocker Defender load handler which is executed when it's fully ready. * * Note: onError can still happen after the load and should stop the app. * * Handler function accepts {secureEnclaveReturnData}, which is the data * returned from the secure enclave synchronously with return statement. * This data must be serializable to JSON and contain primitives only * (including objects and arrays). */ onLoad?: ((secureEnclaveReturnData?: any) => void) | null; /** * Emitted when DataUnlocker Defender performed all possible efforts towards initializing or * detecting its circumvention but has failed. This event can happen both before and after 'load'. * * Return boolean `true` from your error handler to prevent displaying the default DataUnlocker-branded * placeholder element on errors, which you can get separately by calling `getPlaceholder(code)`. */ onError?: ((code: number) => void | true) | null; }, { default: {}; }>, { [evt: string]: CustomEvent<any>; }, { default: {}; }, {}, string>; type Defender = InstanceType<typeof Defender>; export default Defender;