perf: Avoid an extra function call and object clone during event emission (#1441)
performance: remove a nested function call and an object clone during event emission - rename `event` to `eventWithoutTime`, but maintain backwards compatibility - `eventWithTime` (with time) could be renamed to `event` in a future version This is an extension of PR #1339 authored by: mydea <mydea@users.noreply.github.com>
This commit is contained in:
@@ -163,7 +163,7 @@ export type incrementalData =
|
||||
| adoptedStyleSheetData
|
||||
| customElementData;
|
||||
|
||||
export type event =
|
||||
export type eventWithoutTime =
|
||||
| domContentLoadedEvent
|
||||
| loadedEvent
|
||||
| fullSnapshotEvent
|
||||
@@ -172,7 +172,13 @@ export type event =
|
||||
| customEvent
|
||||
| pluginEvent;
|
||||
|
||||
export type eventWithTime = event & {
|
||||
/**
|
||||
* @deprecated intended for internal use
|
||||
* a synonym for eventWithoutTime
|
||||
*/
|
||||
export type event = eventWithoutTime;
|
||||
|
||||
export type eventWithTime = eventWithoutTime & {
|
||||
timestamp: number;
|
||||
delay?: number;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user