add hooks API (#132)
This commit is contained in:
14
src/types.ts
14
src/types.ts
@@ -119,6 +119,7 @@ export type recordOptions = {
|
||||
ignoreClass?: string;
|
||||
maskAllInputs?: boolean;
|
||||
inlineStylesheet?: boolean;
|
||||
hooks?: hooksParam;
|
||||
};
|
||||
|
||||
export type observerParam = {
|
||||
@@ -134,6 +135,15 @@ export type observerParam = {
|
||||
inlineStylesheet: boolean;
|
||||
};
|
||||
|
||||
export type hooksParam = {
|
||||
mutation?: mutationCallBack;
|
||||
mousemove?: mousemoveCallBack;
|
||||
mouseInteraction?: mouseInteractionCallBack;
|
||||
scroll?: scrollCallback;
|
||||
viewportResize?: viewportResizeCallback;
|
||||
input?: inputCallback;
|
||||
};
|
||||
|
||||
export type textCursor = {
|
||||
node: Node;
|
||||
value: string | null;
|
||||
@@ -285,6 +295,10 @@ export type Emitter = {
|
||||
emit(type: string, event?: unknown): void;
|
||||
};
|
||||
|
||||
export type Arguments<T> = T extends (...payload: infer U) => unknown
|
||||
? U
|
||||
: unknown;
|
||||
|
||||
export enum ReplayerEvents {
|
||||
Start = 'start',
|
||||
Pause = 'pause',
|
||||
|
||||
Reference in New Issue
Block a user