UNPKG

@snap/camera-kit

Version:
29 lines 1.3 kB
import type { LensExecutionError, LensImagePickerError, LensAbortError } from "../namedErrors"; import type { TypedCustomEvent } from "../events/TypedCustomEvent"; import type { TypedEventListener } from "../events/TypedEventTarget"; import type { Lens } from "../lens/Lens"; /** * Events emitted by {@link CameraKitSession.events | CameraKitSession.events}. * * The following events are emitted: * - `error`: An error has been encountered during lens rendering. May contain an error of type: * - {@link LensExecutionError} If an error of this type occurs, the rendering lens will be automatically removed * from the associated CameraKitSession. * - {@link LensImagePickerError} * * @category Rendering * @category Lenses */ export type CameraKitSessionEvents = TypedCustomEvent<"error", { error: LensExecutionError | LensAbortError | LensImagePickerError; lens: Lens; }>; /** * Listener of {@link CameraKitSessionEvents} events. */ export type CameraKitSessionEventListener = TypedEventListener<CameraKitSessionEvents>; /** * Determines if the value is an error to be reported to the host application. */ export declare function isPublicLensError(value: unknown): value is CameraKitSessionEvents["detail"]["error"]; //# sourceMappingURL=CameraKitSessionEvents.d.ts.map