add hooks API (#132)
This commit is contained in:
10
typings/types.d.ts
vendored
10
typings/types.d.ts
vendored
@@ -88,6 +88,7 @@ export declare type recordOptions = {
|
||||
ignoreClass?: string;
|
||||
maskAllInputs?: boolean;
|
||||
inlineStylesheet?: boolean;
|
||||
hooks?: hooksParam;
|
||||
};
|
||||
export declare type observerParam = {
|
||||
mutationCb: mutationCallBack;
|
||||
@@ -101,6 +102,14 @@ export declare type observerParam = {
|
||||
maskAllInputs: boolean;
|
||||
inlineStylesheet: boolean;
|
||||
};
|
||||
export declare type hooksParam = {
|
||||
mutation?: mutationCallBack;
|
||||
mousemove?: mousemoveCallBack;
|
||||
mouseInteraction?: mouseInteractionCallBack;
|
||||
scroll?: scrollCallback;
|
||||
viewportResize?: viewportResizeCallback;
|
||||
input?: inputCallback;
|
||||
};
|
||||
export declare type textCursor = {
|
||||
node: Node;
|
||||
value: string | null;
|
||||
@@ -225,6 +234,7 @@ export declare type Emitter = {
|
||||
on(type: string, handler: Handler): void;
|
||||
emit(type: string, event?: unknown): void;
|
||||
};
|
||||
export declare type Arguments<T> = T extends (...payload: infer U) => unknown ? U : unknown;
|
||||
export declare enum ReplayerEvents {
|
||||
Start = "start",
|
||||
Pause = "pause",
|
||||
|
||||
Reference in New Issue
Block a user