Upgrade Typescript to 4.6.2, and bump up other packages (#856)

This commit is contained in:
Justin Halsall
2026-04-01 12:00:00 +08:00
committed by GitHub
parent e926c82312
commit e29bdfda95
8 changed files with 855 additions and 36 deletions

View File

@@ -4,6 +4,9 @@ import {
IncrementalSource,
eventWithTime,
MouseInteractions,
Optional,
mouseInteractionData,
event,
} from '../src/types';
import * as puppeteer from 'puppeteer';
import { format } from 'prettier';
@@ -106,8 +109,8 @@ function stringifySnapshots(snapshots: eventWithTime[]): string {
s.type === EventType.IncrementalSnapshot &&
s.data.source === IncrementalSource.MouseInteraction
) {
delete s.data.x;
delete s.data.y;
delete (s.data as Optional<mouseInteractionData, 'x'>).x;
delete (s.data as Optional<mouseInteractionData, 'y'>).y;
}
if (
s.type === EventType.IncrementalSnapshot &&
@@ -149,8 +152,8 @@ function stringifySnapshots(snapshots: eventWithTime[]): string {
coordinatesReg.lastIndex = 0; // wow, a real wart in ECMAScript
});
}
delete s.timestamp;
return s;
delete (s as Optional<eventWithTime, 'timestamp'>).timestamp;
return s as event;
}),
null,
2,