From cfb0dc7b5b9f66314c37e207a1541fa75c0faed7 Mon Sep 17 00:00:00 2001 From: wangfukang Date: Tue, 24 Dec 2024 11:17:23 +0800 Subject: [PATCH] docs: update docs --- packages/rrweb/src/types.ts | 1 - packages/rrweb/test/events/merge-events.ts | 20 ++++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/packages/rrweb/src/types.ts b/packages/rrweb/src/types.ts index 336de63f98..abf7348601 100644 --- a/packages/rrweb/src/types.ts +++ b/packages/rrweb/src/types.ts @@ -230,7 +230,6 @@ export type MergeOptions = { // row events to deal with events: eventWithTime[]; // options for take fullsnapshot, and mirror is required - // snapshotOptions: Parameters[1]; snapshotOptions: Parameters[1] & { mirror: Mirror }; // startTimeStamp to generate from startTimeStamp: number; diff --git a/packages/rrweb/test/events/merge-events.ts b/packages/rrweb/test/events/merge-events.ts index cf98bbebfb..1f6e795978 100644 --- a/packages/rrweb/test/events/merge-events.ts +++ b/packages/rrweb/test/events/merge-events.ts @@ -3,7 +3,7 @@ import type { eventWithTime } from '@rrweb/types'; const events: eventWithTime[] = [ { - type: 4, + type: EventType.Meta, data: { href: 'http://localhost', width: 417, @@ -12,7 +12,7 @@ const events: eventWithTime[] = [ timestamp: 1734952276181, }, { - type: 2, + type: EventType.FullSnapshot, data: { node: { type: 0, @@ -314,9 +314,9 @@ const events: eventWithTime[] = [ timestamp: 1734952276197, }, { - type: 3, + type: EventType.IncrementalSnapshot, data: { - source: 5, + source: IncrementalSource.Input, text: 'dog', isChecked: false, id: 15, @@ -324,9 +324,9 @@ const events: eventWithTime[] = [ timestamp: 1734952277674, }, { - type: 3, + type: EventType.IncrementalSnapshot, data: { - source: 5, + source: IncrementalSource.Input, text: 'cat', isChecked: false, id: 15, @@ -334,9 +334,9 @@ const events: eventWithTime[] = [ timestamp: 1734952279091, }, { - type: 3, + type: EventType.IncrementalSnapshot, data: { - source: 5, + source: IncrementalSource.Input, text: 'on', isChecked: false, id: 29, @@ -344,9 +344,9 @@ const events: eventWithTime[] = [ timestamp: 1734952280046, }, { - type: 3, + type: EventType.IncrementalSnapshot, data: { - source: 5, + source: IncrementalSource.Input, text: 'on', isChecked: true, id: 29,