@astral/mobx-query 1.15.0 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/MobxQuery/MobxQuery.d.ts +13 -8
  2. package/MobxQuery/MobxQuery.js +19 -18
  3. package/MobxQuery/types.d.ts +22 -0
  4. package/MobxQuery/types.js +1 -0
  5. package/PollingService/PollingService.d.ts +34 -0
  6. package/PollingService/PollingService.js +95 -0
  7. package/PollingService/index.d.ts +1 -0
  8. package/PollingService/index.js +1 -0
  9. package/README.md +22 -0
  10. package/SynchronizationService/SynchronizationService.d.ts +5 -5
  11. package/SynchronizationService/SynchronizationService.js +4 -7
  12. package/__test/BroadcastChannel/BroadcastChannel.d.ts +1 -0
  13. package/__test/BroadcastChannel/BroadcastChannel.js +13 -0
  14. package/__test/BroadcastChannel/index.d.ts +1 -0
  15. package/__test/BroadcastChannel/index.js +1 -0
  16. package/__test/documentMock/documentMock.d.ts +380 -0
  17. package/__test/documentMock/documentMock.js +18 -0
  18. package/__test/documentMock/index.d.ts +1 -0
  19. package/__test/documentMock/index.js +1 -0
  20. package/__test/index.d.ts +2 -0
  21. package/__test/index.js +2 -0
  22. package/node/MobxQuery/MobxQuery.d.ts +13 -8
  23. package/node/MobxQuery/MobxQuery.js +19 -18
  24. package/node/MobxQuery/types.d.ts +22 -0
  25. package/node/MobxQuery/types.js +2 -0
  26. package/node/PollingService/PollingService.d.ts +34 -0
  27. package/node/PollingService/PollingService.js +99 -0
  28. package/node/PollingService/index.d.ts +1 -0
  29. package/node/PollingService/index.js +17 -0
  30. package/node/SynchronizationService/SynchronizationService.d.ts +5 -5
  31. package/node/SynchronizationService/SynchronizationService.js +4 -7
  32. package/node/__test/BroadcastChannel/BroadcastChannel.d.ts +1 -0
  33. package/node/__test/BroadcastChannel/BroadcastChannel.js +17 -0
  34. package/node/__test/BroadcastChannel/index.d.ts +1 -0
  35. package/node/__test/BroadcastChannel/index.js +17 -0
  36. package/node/__test/documentMock/documentMock.d.ts +380 -0
  37. package/node/__test/documentMock/documentMock.js +22 -0
  38. package/node/__test/documentMock/index.d.ts +1 -0
  39. package/node/__test/documentMock/index.js +17 -0
  40. package/node/__test/index.d.ts +2 -0
  41. package/node/__test/index.js +18 -0
  42. package/package.json +4 -2
@@ -0,0 +1,34 @@
1
+ import { type AdaptableMap } from '../AdaptableMap';
2
+ import { type KeyHash, type UnknownCachedQuery } from '../MobxQuery/types';
3
+ /**
4
+ * Сущность для инкапсулирования логики работы с устареванием данных
5
+ */
6
+ export declare class PollingService {
7
+ private readonly _queryStorage;
8
+ private readonly _invalidateByKeyHash;
9
+ private readonly _document;
10
+ private timers;
11
+ private timerDates;
12
+ private isVisible;
13
+ constructor(_queryStorage: AdaptableMap<UnknownCachedQuery>, _invalidateByKeyHash: (keyHash: KeyHash) => void, _document?: Document);
14
+ private updateIsVisible;
15
+ private init;
16
+ private handleVisibilityChange;
17
+ private restartPausedTimers;
18
+ private pauseTimers;
19
+ /**
20
+ * Очистка таймеров,
21
+ * предполагается использование либо при срабатывании таймера,
22
+ * либо при досрочном вызове из внешней инвалидации
23
+ */
24
+ clean: (key: KeyHash) => void;
25
+ /**
26
+ * Перезапуск имеющегося таймера, предполагается использование при срабатывании синхронизации между вкладками
27
+ */
28
+ restart: (key: KeyHash) => void;
29
+ private invalidate;
30
+ /**
31
+ * Установка таймера устаревания данных
32
+ */
33
+ setupTimer: (key: KeyHash, pollingTime: number) => void;
34
+ }
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PollingService = void 0;
4
+ /**
5
+ * Сущность для инкапсулирования логики работы с устареванием данных
6
+ */
7
+ class PollingService {
8
+ constructor(_queryStorage, _invalidateByKeyHash, _document = globalThis.document) {
9
+ this._queryStorage = _queryStorage;
10
+ this._invalidateByKeyHash = _invalidateByKeyHash;
11
+ this._document = _document;
12
+ this.timers = new Map();
13
+ this.timerDates = new Map();
14
+ this.isVisible = true;
15
+ this.updateIsVisible = () => {
16
+ var _a;
17
+ this.isVisible = ((_a = this._document) === null || _a === void 0 ? void 0 : _a.visibilityState) === 'visible';
18
+ };
19
+ this.init = () => {
20
+ var _a;
21
+ this.updateIsVisible();
22
+ (_a = this._document) === null || _a === void 0 ? void 0 : _a.addEventListener('visibilitychange', this.handleVisibilityChange);
23
+ };
24
+ this.handleVisibilityChange = () => {
25
+ this.updateIsVisible();
26
+ if (this.isVisible) {
27
+ this.restartPausedTimers();
28
+ }
29
+ else {
30
+ this.pauseTimers();
31
+ }
32
+ };
33
+ this.restartPausedTimers = () => {
34
+ this.timerDates.keys().forEach((key) => {
35
+ const dateNow = Date.now();
36
+ const { pollingTime, targetDate } = this.timerDates.get(key);
37
+ const isAlreadyExpired = targetDate < dateNow;
38
+ if (isAlreadyExpired) {
39
+ this.invalidate(key);
40
+ }
41
+ else {
42
+ this.setupTimer(key, pollingTime);
43
+ }
44
+ });
45
+ };
46
+ this.pauseTimers = () => {
47
+ this.timers.keys().forEach((key) => {
48
+ globalThis.clearTimeout(this.timers.get(key));
49
+ this.timers.delete(key);
50
+ });
51
+ };
52
+ /**
53
+ * Очистка таймеров,
54
+ * предполагается использование либо при срабатывании таймера,
55
+ * либо при досрочном вызове из внешней инвалидации
56
+ */
57
+ this.clean = (key) => {
58
+ globalThis.clearTimeout(this.timers.get(key));
59
+ this.timers.delete(key);
60
+ this.timerDates.delete(key);
61
+ };
62
+ /**
63
+ * Перезапуск имеющегося таймера, предполагается использование при срабатывании синхронизации между вкладками
64
+ */
65
+ this.restart = (key) => {
66
+ const saved = this.timerDates.get(key);
67
+ if (saved) {
68
+ this.setupTimer(key, saved.pollingTime);
69
+ }
70
+ };
71
+ this.invalidate = (key) => {
72
+ const query = this._queryStorage.get(key);
73
+ if (query) {
74
+ this._invalidateByKeyHash(key);
75
+ }
76
+ this.clean(key);
77
+ };
78
+ /**
79
+ * Установка таймера устаревания данных
80
+ */
81
+ this.setupTimer = (key, pollingTime) => {
82
+ if (this.timers.has(key)) {
83
+ globalThis.clearTimeout(this.timers.get(key));
84
+ }
85
+ if (!this._queryStorage.get(key)) {
86
+ return;
87
+ }
88
+ this.timerDates.set(key, {
89
+ pollingTime,
90
+ targetDate: Date.now() + pollingTime,
91
+ });
92
+ if (this.isVisible) {
93
+ this.timers.set(key, globalThis.setTimeout(() => this.invalidate(key), pollingTime));
94
+ }
95
+ };
96
+ this.init();
97
+ }
98
+ }
99
+ exports.PollingService = PollingService;
@@ -0,0 +1 @@
1
+ export * from './PollingService';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./PollingService"), exports);
@@ -1,16 +1,16 @@
1
1
  import { type DataStorageFactory } from '../DataStorage';
2
+ import { type Keys } from '../MobxQuery/types';
3
+ import { type PollingService } from '../PollingService';
2
4
  import { type StatusStorageFactory } from '../StatusStorage';
3
5
  export declare class SynchronizationService {
4
6
  private readonly _statusStorageFactory;
5
7
  private readonly _dataStorageFactory;
8
+ private readonly _pollingService;
6
9
  private readonly broadcastChannel?;
7
- constructor(_statusStorageFactory: StatusStorageFactory, _dataStorageFactory: DataStorageFactory, _BroadcastChannel?: {
10
+ constructor(_statusStorageFactory: StatusStorageFactory, _dataStorageFactory: DataStorageFactory, _pollingService: PollingService, _BroadcastChannel?: {
8
11
  new (name: string): BroadcastChannel;
9
12
  prototype: BroadcastChannel;
10
13
  });
11
14
  private init;
12
- emit: (keys: {
13
- dataKeyHash: string;
14
- statusKeyHash: string;
15
- }) => void;
15
+ emit: (keys: Keys) => void;
16
16
  }
@@ -2,9 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SynchronizationService = void 0;
4
4
  class SynchronizationService {
5
- constructor(_statusStorageFactory, _dataStorageFactory, _BroadcastChannel = globalThis.BroadcastChannel) {
5
+ constructor(_statusStorageFactory, _dataStorageFactory, _pollingService, _BroadcastChannel = globalThis.BroadcastChannel) {
6
6
  this._statusStorageFactory = _statusStorageFactory;
7
7
  this._dataStorageFactory = _dataStorageFactory;
8
+ this._pollingService = _pollingService;
8
9
  this.init = () => {
9
10
  var _a;
10
11
  (_a = this.broadcastChannel) === null || _a === void 0 ? void 0 : _a.addEventListener('message', (event) => {
@@ -13,16 +14,12 @@ class SynchronizationService {
13
14
  .getStorage(event.data.dataKeyHash)) === null || _a === void 0 ? void 0 : _a.setData(event.data.data);
14
15
  (_b = this._statusStorageFactory
15
16
  .getStorage(event.data.statusKeyHash)) === null || _b === void 0 ? void 0 : _b.setStatues(event.data.statuses);
17
+ this._pollingService.restart(event.data.queryKeyHash);
16
18
  });
17
19
  };
18
20
  this.emit = (keys) => {
19
21
  var _a, _b, _c;
20
- (_a = this.broadcastChannel) === null || _a === void 0 ? void 0 : _a.postMessage({
21
- dataKeyHash: keys.dataKeyHash,
22
- statusKeyHash: keys.statusKeyHash,
23
- data: (_b = this._dataStorageFactory.getStorage(keys.dataKeyHash)) === null || _b === void 0 ? void 0 : _b.data,
24
- statuses: (_c = this._statusStorageFactory.getStorage(keys.statusKeyHash)) === null || _c === void 0 ? void 0 : _c.statuses,
25
- });
22
+ (_a = this.broadcastChannel) === null || _a === void 0 ? void 0 : _a.postMessage(Object.assign(Object.assign({}, keys), { data: (_b = this._dataStorageFactory.getStorage(keys.dataKeyHash)) === null || _b === void 0 ? void 0 : _b.data, statuses: (_c = this._statusStorageFactory.getStorage(keys.statusKeyHash)) === null || _c === void 0 ? void 0 : _c.statuses }));
26
23
  };
27
24
  if (_BroadcastChannel) {
28
25
  this.broadcastChannel = new _BroadcastChannel('@astral/mobx-query');
@@ -0,0 +1 @@
1
+ export declare const createBroadcastChannelMock: () => typeof globalThis.BroadcastChannel;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createBroadcastChannelMock = void 0;
4
+ // Мок не предусматривает полного повторения функционала оригинального BroadcastChannelMock
5
+ // поэтому он будет вызывать даже подписчиков вкладки инициатора,
6
+ // но благодаря общему подходу, ожидается, что это не вызовет проблем
7
+ const createBroadcastChannelMock = () => {
8
+ const listeners = [];
9
+ class BroadcastChannelMock {
10
+ constructor() {
11
+ this.addEventListener = (_, listener) => listeners.push(listener);
12
+ this.postMessage = (data) => listeners.forEach((listener) => listener({ data }));
13
+ }
14
+ }
15
+ return BroadcastChannelMock;
16
+ };
17
+ exports.createBroadcastChannelMock = createBroadcastChannelMock;
@@ -0,0 +1 @@
1
+ export * from './BroadcastChannel';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./BroadcastChannel"), exports);
@@ -0,0 +1,380 @@
1
+ export declare const createDocumentMock: () => {
2
+ documentMock: {
3
+ readonly URL: string;
4
+ alinkColor: string;
5
+ readonly all: HTMLAllCollection;
6
+ readonly anchors: HTMLCollectionOf<HTMLAnchorElement>;
7
+ readonly applets: HTMLCollection;
8
+ bgColor: string;
9
+ body: HTMLElement;
10
+ readonly characterSet: string;
11
+ readonly charset: string;
12
+ readonly compatMode: string;
13
+ readonly contentType: string;
14
+ cookie: string;
15
+ readonly currentScript: HTMLOrSVGScriptElement | null;
16
+ readonly defaultView: (WindowProxy & typeof globalThis) | null;
17
+ designMode: string;
18
+ dir: string;
19
+ readonly doctype: DocumentType | null;
20
+ readonly documentElement: HTMLElement;
21
+ readonly documentURI: string;
22
+ domain: string;
23
+ readonly embeds: HTMLCollectionOf<HTMLEmbedElement>;
24
+ fgColor: string;
25
+ readonly forms: HTMLCollectionOf<HTMLFormElement>;
26
+ readonly fragmentDirective: FragmentDirective;
27
+ readonly fullscreen: boolean;
28
+ readonly fullscreenEnabled: boolean;
29
+ readonly head: HTMLHeadElement;
30
+ readonly hidden: boolean;
31
+ readonly images: HTMLCollectionOf<HTMLImageElement>;
32
+ readonly implementation: DOMImplementation;
33
+ readonly inputEncoding: string;
34
+ readonly lastModified: string;
35
+ linkColor: string;
36
+ readonly links: HTMLCollectionOf<HTMLAnchorElement | HTMLAreaElement>;
37
+ location: Location;
38
+ onfullscreenchange: ((this: Document, ev: Event) => any) | null;
39
+ onfullscreenerror: ((this: Document, ev: Event) => any) | null;
40
+ onpointerlockchange: ((this: Document, ev: Event) => any) | null;
41
+ onpointerlockerror: ((this: Document, ev: Event) => any) | null;
42
+ onreadystatechange: ((this: Document, ev: Event) => any) | null;
43
+ onvisibilitychange: ((this: Document, ev: Event) => any) | null;
44
+ readonly ownerDocument: null;
45
+ readonly pictureInPictureEnabled: boolean;
46
+ readonly plugins: HTMLCollectionOf<HTMLEmbedElement>;
47
+ readonly readyState: DocumentReadyState;
48
+ readonly referrer: string;
49
+ readonly rootElement: SVGSVGElement | null;
50
+ readonly scripts: HTMLCollectionOf<HTMLScriptElement>;
51
+ readonly scrollingElement: Element | null;
52
+ readonly timeline: DocumentTimeline;
53
+ title: string;
54
+ readonly visibilityState: DocumentVisibilityState;
55
+ vlinkColor: string;
56
+ adoptNode: (<T extends Node>(node: T) => T) & import("vitest-mock-extended").CalledWithMock<Node, [node: Node]>;
57
+ captureEvents: (() => void) & import("vitest-mock-extended").CalledWithMock<void, []>;
58
+ caretPositionFromPoint: ((x: number, y: number, options?: CaretPositionFromPointOptions) => CaretPosition | null) & import("vitest-mock-extended").CalledWithMock<CaretPosition | null, [x: number, y: number, options?: CaretPositionFromPointOptions | undefined]>;
59
+ caretRangeFromPoint: ((x: number, y: number) => Range | null) & import("vitest-mock-extended").CalledWithMock<Range | null, [x: number, y: number]>;
60
+ clear: (() => void) & import("vitest-mock-extended").CalledWithMock<void, []>;
61
+ close: (() => void) & import("vitest-mock-extended").CalledWithMock<void, []>;
62
+ createAttribute: ((localName: string) => Attr) & import("vitest-mock-extended").CalledWithMock<Attr, [localName: string]>;
63
+ createAttributeNS: ((namespace: string | null, qualifiedName: string) => Attr) & import("vitest-mock-extended").CalledWithMock<Attr, [namespace: string | null, qualifiedName: string]>;
64
+ createCDATASection: ((data: string) => CDATASection) & import("vitest-mock-extended").CalledWithMock<CDATASection, [data: string]>;
65
+ createComment: ((data: string) => Comment) & import("vitest-mock-extended").CalledWithMock<Comment, [data: string]>;
66
+ createDocumentFragment: (() => DocumentFragment) & import("vitest-mock-extended").CalledWithMock<DocumentFragment, []>;
67
+ createElement: {
68
+ <K extends keyof HTMLElementTagNameMap>(tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K];
69
+ <K extends keyof HTMLElementDeprecatedTagNameMap>(tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K];
70
+ (tagName: string, options?: ElementCreationOptions): HTMLElement;
71
+ } & import("vitest-mock-extended").CalledWithMock<HTMLElement, [tagName: string, options?: ElementCreationOptions | undefined]>;
72
+ createElementNS: {
73
+ (namespaceURI: "http://www.w3.org/1999/xhtml", qualifiedName: string): HTMLElement;
74
+ <K extends keyof SVGElementTagNameMap>(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: K): SVGElementTagNameMap[K];
75
+ (namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: string): SVGElement;
76
+ <K extends keyof MathMLElementTagNameMap>(namespaceURI: "http://www.w3.org/1998/Math/MathML", qualifiedName: K): MathMLElementTagNameMap[K];
77
+ (namespaceURI: "http://www.w3.org/1998/Math/MathML", qualifiedName: string): MathMLElement;
78
+ (namespaceURI: string | null, qualifiedName: string, options?: ElementCreationOptions): Element;
79
+ (namespace: string | null, qualifiedName: string, options?: string | ElementCreationOptions): Element;
80
+ } & import("vitest-mock-extended").CalledWithMock<Element, [namespace: string | null, qualifiedName: string, options?: string | ElementCreationOptions | undefined]>;
81
+ createEvent: {
82
+ (eventInterface: "AnimationEvent"): AnimationEvent;
83
+ (eventInterface: "AnimationPlaybackEvent"): AnimationPlaybackEvent;
84
+ (eventInterface: "AudioProcessingEvent"): AudioProcessingEvent;
85
+ (eventInterface: "BeforeUnloadEvent"): BeforeUnloadEvent;
86
+ (eventInterface: "BlobEvent"): BlobEvent;
87
+ (eventInterface: "ClipboardEvent"): ClipboardEvent;
88
+ (eventInterface: "CloseEvent"): CloseEvent;
89
+ (eventInterface: "CompositionEvent"): CompositionEvent;
90
+ (eventInterface: "ContentVisibilityAutoStateChangeEvent"): ContentVisibilityAutoStateChangeEvent;
91
+ (eventInterface: "CustomEvent"): CustomEvent;
92
+ (eventInterface: "DeviceMotionEvent"): DeviceMotionEvent;
93
+ (eventInterface: "DeviceOrientationEvent"): DeviceOrientationEvent;
94
+ (eventInterface: "DragEvent"): DragEvent;
95
+ (eventInterface: "ErrorEvent"): ErrorEvent;
96
+ (eventInterface: "Event"): Event;
97
+ (eventInterface: "Events"): Event;
98
+ (eventInterface: "FocusEvent"): FocusEvent;
99
+ (eventInterface: "FontFaceSetLoadEvent"): FontFaceSetLoadEvent;
100
+ (eventInterface: "FormDataEvent"): FormDataEvent;
101
+ (eventInterface: "GamepadEvent"): GamepadEvent;
102
+ (eventInterface: "HashChangeEvent"): HashChangeEvent;
103
+ (eventInterface: "IDBVersionChangeEvent"): IDBVersionChangeEvent;
104
+ (eventInterface: "InputEvent"): InputEvent;
105
+ (eventInterface: "KeyboardEvent"): KeyboardEvent;
106
+ (eventInterface: "MIDIConnectionEvent"): MIDIConnectionEvent;
107
+ (eventInterface: "MIDIMessageEvent"): MIDIMessageEvent;
108
+ (eventInterface: "MediaEncryptedEvent"): MediaEncryptedEvent;
109
+ (eventInterface: "MediaKeyMessageEvent"): MediaKeyMessageEvent;
110
+ (eventInterface: "MediaQueryListEvent"): MediaQueryListEvent;
111
+ (eventInterface: "MediaStreamTrackEvent"): MediaStreamTrackEvent;
112
+ (eventInterface: "MessageEvent"): MessageEvent;
113
+ (eventInterface: "MouseEvent"): MouseEvent;
114
+ (eventInterface: "MouseEvents"): MouseEvent;
115
+ (eventInterface: "OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent;
116
+ (eventInterface: "PageRevealEvent"): PageRevealEvent;
117
+ (eventInterface: "PageSwapEvent"): PageSwapEvent;
118
+ (eventInterface: "PageTransitionEvent"): PageTransitionEvent;
119
+ (eventInterface: "PaymentMethodChangeEvent"): PaymentMethodChangeEvent;
120
+ (eventInterface: "PaymentRequestUpdateEvent"): PaymentRequestUpdateEvent;
121
+ (eventInterface: "PictureInPictureEvent"): PictureInPictureEvent;
122
+ (eventInterface: "PointerEvent"): PointerEvent;
123
+ (eventInterface: "PopStateEvent"): PopStateEvent;
124
+ (eventInterface: "ProgressEvent"): ProgressEvent;
125
+ (eventInterface: "PromiseRejectionEvent"): PromiseRejectionEvent;
126
+ (eventInterface: "RTCDTMFToneChangeEvent"): RTCDTMFToneChangeEvent;
127
+ (eventInterface: "RTCDataChannelEvent"): RTCDataChannelEvent;
128
+ (eventInterface: "RTCErrorEvent"): RTCErrorEvent;
129
+ (eventInterface: "RTCPeerConnectionIceErrorEvent"): RTCPeerConnectionIceErrorEvent;
130
+ (eventInterface: "RTCPeerConnectionIceEvent"): RTCPeerConnectionIceEvent;
131
+ (eventInterface: "RTCTrackEvent"): RTCTrackEvent;
132
+ (eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent;
133
+ (eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent;
134
+ (eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent;
135
+ (eventInterface: "StorageEvent"): StorageEvent;
136
+ (eventInterface: "SubmitEvent"): SubmitEvent;
137
+ (eventInterface: "TextEvent"): TextEvent;
138
+ (eventInterface: "ToggleEvent"): ToggleEvent;
139
+ (eventInterface: "TouchEvent"): TouchEvent;
140
+ (eventInterface: "TrackEvent"): TrackEvent;
141
+ (eventInterface: "TransitionEvent"): TransitionEvent;
142
+ (eventInterface: "UIEvent"): UIEvent;
143
+ (eventInterface: "UIEvents"): UIEvent;
144
+ (eventInterface: "WebGLContextEvent"): WebGLContextEvent;
145
+ (eventInterface: "WheelEvent"): WheelEvent;
146
+ (eventInterface: string): Event;
147
+ } & import("vitest-mock-extended").CalledWithMock<Event, [eventInterface: string]>;
148
+ createNodeIterator: ((root: Node, whatToShow?: number, filter?: NodeFilter | null) => NodeIterator) & import("vitest-mock-extended").CalledWithMock<NodeIterator, [root: Node, whatToShow?: number | undefined, filter?: NodeFilter | null | undefined]>;
149
+ createProcessingInstruction: ((target: string, data: string) => ProcessingInstruction) & import("vitest-mock-extended").CalledWithMock<ProcessingInstruction, [target: string, data: string]>;
150
+ createRange: (() => Range) & import("vitest-mock-extended").CalledWithMock<Range, []>;
151
+ createTextNode: ((data: string) => Text) & import("vitest-mock-extended").CalledWithMock<Text, [data: string]>;
152
+ createTreeWalker: ((root: Node, whatToShow?: number, filter?: NodeFilter | null) => TreeWalker) & import("vitest-mock-extended").CalledWithMock<TreeWalker, [root: Node, whatToShow?: number | undefined, filter?: NodeFilter | null | undefined]>;
153
+ execCommand: ((commandId: string, showUI?: boolean, value?: string) => boolean) & import("vitest-mock-extended").CalledWithMock<boolean, [commandId: string, showUI?: boolean | undefined, value?: string | undefined]>;
154
+ exitFullscreen: (() => Promise<void>) & import("vitest-mock-extended").CalledWithMock<Promise<void>, []>;
155
+ exitPictureInPicture: (() => Promise<void>) & import("vitest-mock-extended").CalledWithMock<Promise<void>, []>;
156
+ exitPointerLock: (() => void) & import("vitest-mock-extended").CalledWithMock<void, []>;
157
+ getElementById: ((elementId: string) => HTMLElement | null) & import("vitest-mock-extended").CalledWithMock<HTMLElement | null, [elementId: string]>;
158
+ getElementsByClassName: ((classNames: string) => HTMLCollectionOf<Element>) & import("vitest-mock-extended").CalledWithMock<HTMLCollectionOf<Element>, [classNames: string]>;
159
+ getElementsByName: ((elementName: string) => NodeListOf<HTMLElement>) & import("vitest-mock-extended").CalledWithMock<NodeListOf<HTMLElement>, [elementName: string]>;
160
+ getElementsByTagName: {
161
+ <K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
162
+ <K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>;
163
+ <K extends keyof MathMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<MathMLElementTagNameMap[K]>;
164
+ <K extends keyof HTMLElementDeprecatedTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>;
165
+ (qualifiedName: string): HTMLCollectionOf<Element>;
166
+ } & import("vitest-mock-extended").CalledWithMock<HTMLCollectionOf<Element>, [qualifiedName: string]>;
167
+ getElementsByTagNameNS: {
168
+ (namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
169
+ (namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
170
+ (namespaceURI: "http://www.w3.org/1998/Math/MathML", localName: string): HTMLCollectionOf<MathMLElement>;
171
+ (namespace: string | null, localName: string): HTMLCollectionOf<Element>;
172
+ } & import("vitest-mock-extended").CalledWithMock<HTMLCollectionOf<Element>, [namespace: string | null, localName: string]>;
173
+ getSelection: (() => Selection | null) & import("vitest-mock-extended").CalledWithMock<Selection | null, []>;
174
+ hasFocus: (() => boolean) & import("vitest-mock-extended").CalledWithMock<boolean, []>;
175
+ hasStorageAccess: (() => Promise<boolean>) & import("vitest-mock-extended").CalledWithMock<Promise<boolean>, []>;
176
+ importNode: (<T extends Node>(node: T, subtree?: boolean) => T) & import("vitest-mock-extended").CalledWithMock<Node, [node: Node, subtree?: boolean | undefined]>;
177
+ open: {
178
+ (unused1?: string, unused2?: string): Document;
179
+ (url: string | URL, name: string, features: string): WindowProxy | null;
180
+ } & import("vitest-mock-extended").CalledWithMock<Window | null, [url: string | URL, name: string, features: string]>;
181
+ queryCommandEnabled: ((commandId: string) => boolean) & import("vitest-mock-extended").CalledWithMock<boolean, [commandId: string]>;
182
+ queryCommandIndeterm: ((commandId: string) => boolean) & import("vitest-mock-extended").CalledWithMock<boolean, [commandId: string]>;
183
+ queryCommandState: ((commandId: string) => boolean) & import("vitest-mock-extended").CalledWithMock<boolean, [commandId: string]>;
184
+ queryCommandSupported: ((commandId: string) => boolean) & import("vitest-mock-extended").CalledWithMock<boolean, [commandId: string]>;
185
+ queryCommandValue: ((commandId: string) => string) & import("vitest-mock-extended").CalledWithMock<string, [commandId: string]>;
186
+ releaseEvents: (() => void) & import("vitest-mock-extended").CalledWithMock<void, []>;
187
+ requestStorageAccess: (() => Promise<void>) & import("vitest-mock-extended").CalledWithMock<Promise<void>, []>;
188
+ startViewTransition: ((callbackOptions?: ViewTransitionUpdateCallback) => ViewTransition) & import("vitest-mock-extended").CalledWithMock<ViewTransition, [callbackOptions?: ViewTransitionUpdateCallback | undefined]>;
189
+ write: ((...text: string[]) => void) & import("vitest-mock-extended").CalledWithMock<void, string[]>;
190
+ writeln: ((...text: string[]) => void) & import("vitest-mock-extended").CalledWithMock<void, string[]>;
191
+ addEventListener: {
192
+ <K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
193
+ (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
194
+ } & import("vitest-mock-extended").CalledWithMock<void, [type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined]>;
195
+ removeEventListener: {
196
+ <K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
197
+ (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
198
+ } & import("vitest-mock-extended").CalledWithMock<void, [type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined]>;
199
+ readonly baseURI: string;
200
+ readonly childNodes: NodeListOf<ChildNode>;
201
+ readonly firstChild: ChildNode | null;
202
+ readonly isConnected: boolean;
203
+ readonly lastChild: ChildNode | null;
204
+ readonly nextSibling: ChildNode | null;
205
+ readonly nodeName: string;
206
+ readonly nodeType: number;
207
+ nodeValue: string | null;
208
+ readonly parentElement: HTMLElement | null;
209
+ readonly parentNode: ParentNode | null;
210
+ readonly previousSibling: ChildNode | null;
211
+ textContent: string | null;
212
+ appendChild: (<T extends Node>(node: T) => T) & import("vitest-mock-extended").CalledWithMock<Node, [node: Node]>;
213
+ cloneNode: ((subtree?: boolean) => Node) & import("vitest-mock-extended").CalledWithMock<Node, [subtree?: boolean | undefined]>;
214
+ compareDocumentPosition: ((other: Node) => number) & import("vitest-mock-extended").CalledWithMock<number, [other: Node]>;
215
+ contains: ((other: Node | null) => boolean) & import("vitest-mock-extended").CalledWithMock<boolean, [other: Node | null]>;
216
+ getRootNode: ((options?: GetRootNodeOptions) => Node) & import("vitest-mock-extended").CalledWithMock<Node, [options?: GetRootNodeOptions | undefined]>;
217
+ hasChildNodes: (() => boolean) & import("vitest-mock-extended").CalledWithMock<boolean, []>;
218
+ insertBefore: (<T extends Node>(node: T, child: Node | null) => T) & import("vitest-mock-extended").CalledWithMock<Node, [node: Node, child: Node | null]>;
219
+ isDefaultNamespace: ((namespace: string | null) => boolean) & import("vitest-mock-extended").CalledWithMock<boolean, [namespace: string | null]>;
220
+ isEqualNode: ((otherNode: Node | null) => boolean) & import("vitest-mock-extended").CalledWithMock<boolean, [otherNode: Node | null]>;
221
+ isSameNode: ((otherNode: Node | null) => boolean) & import("vitest-mock-extended").CalledWithMock<boolean, [otherNode: Node | null]>;
222
+ lookupNamespaceURI: ((prefix: string | null) => string | null) & import("vitest-mock-extended").CalledWithMock<string | null, [prefix: string | null]>;
223
+ lookupPrefix: ((namespace: string | null) => string | null) & import("vitest-mock-extended").CalledWithMock<string | null, [namespace: string | null]>;
224
+ normalize: (() => void) & import("vitest-mock-extended").CalledWithMock<void, []>;
225
+ removeChild: (<T extends Node>(child: T) => T) & import("vitest-mock-extended").CalledWithMock<Node, [child: Node]>;
226
+ replaceChild: (<T extends Node>(node: Node, child: T) => T) & import("vitest-mock-extended").CalledWithMock<Node, [node: Node, child: Node]>;
227
+ readonly ELEMENT_NODE: 1;
228
+ readonly ATTRIBUTE_NODE: 2;
229
+ readonly TEXT_NODE: 3;
230
+ readonly CDATA_SECTION_NODE: 4;
231
+ readonly ENTITY_REFERENCE_NODE: 5;
232
+ readonly ENTITY_NODE: 6;
233
+ readonly PROCESSING_INSTRUCTION_NODE: 7;
234
+ readonly COMMENT_NODE: 8;
235
+ readonly DOCUMENT_NODE: 9;
236
+ readonly DOCUMENT_TYPE_NODE: 10;
237
+ readonly DOCUMENT_FRAGMENT_NODE: 11;
238
+ readonly NOTATION_NODE: 12;
239
+ readonly DOCUMENT_POSITION_DISCONNECTED: 1;
240
+ readonly DOCUMENT_POSITION_PRECEDING: 2;
241
+ readonly DOCUMENT_POSITION_FOLLOWING: 4;
242
+ readonly DOCUMENT_POSITION_CONTAINS: 8;
243
+ readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
244
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
245
+ dispatchEvent: ((event: Event) => boolean) & import("vitest-mock-extended").CalledWithMock<boolean, [event: Event]>;
246
+ readonly activeElement: Element | null;
247
+ adoptedStyleSheets: CSSStyleSheet[];
248
+ readonly fullscreenElement: Element | null;
249
+ readonly pictureInPictureElement: Element | null;
250
+ readonly pointerLockElement: Element | null;
251
+ readonly styleSheets: StyleSheetList;
252
+ elementFromPoint: ((x: number, y: number) => Element | null) & import("vitest-mock-extended").CalledWithMock<Element | null, [x: number, y: number]>;
253
+ elementsFromPoint: ((x: number, y: number) => Element[]) & import("vitest-mock-extended").CalledWithMock<Element[], [x: number, y: number]>;
254
+ getAnimations: (() => Animation[]) & import("vitest-mock-extended").CalledWithMock<Animation[], []>;
255
+ readonly fonts: FontFaceSet;
256
+ onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
257
+ onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
258
+ onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
259
+ onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
260
+ onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
261
+ onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
262
+ onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
263
+ onbeforetoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
264
+ onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
265
+ oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null;
266
+ oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
267
+ oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
268
+ onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
269
+ onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
270
+ onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
271
+ oncontextlost: ((this: GlobalEventHandlers, ev: Event) => any) | null;
272
+ oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
273
+ oncontextrestored: ((this: GlobalEventHandlers, ev: Event) => any) | null;
274
+ oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
275
+ oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
276
+ oncut: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
277
+ ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
278
+ ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
279
+ ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
280
+ ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
281
+ ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
282
+ ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
283
+ ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
284
+ ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
285
+ ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
286
+ onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
287
+ onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
288
+ onerror: OnErrorEventHandler;
289
+ onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
290
+ onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
291
+ ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
292
+ oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null;
293
+ oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
294
+ onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
295
+ onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
296
+ onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
297
+ onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
298
+ onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
299
+ onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
300
+ onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
301
+ onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
302
+ onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
303
+ onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
304
+ onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
305
+ onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
306
+ onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
307
+ onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
308
+ onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
309
+ onpaste: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
310
+ onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
311
+ onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
312
+ onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
313
+ onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
314
+ onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
315
+ onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
316
+ onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
317
+ onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
318
+ onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
319
+ onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
320
+ onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
321
+ onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;
322
+ onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
323
+ onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
324
+ onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
325
+ onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
326
+ onscrollend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
327
+ onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
328
+ onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
329
+ onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
330
+ onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
331
+ onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
332
+ onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
333
+ onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
334
+ onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
335
+ onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
336
+ onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
337
+ ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
338
+ ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
339
+ ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined | undefined;
340
+ ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined | undefined;
341
+ ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined | undefined;
342
+ ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined | undefined;
343
+ ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
344
+ ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
345
+ ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
346
+ ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
347
+ onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
348
+ onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
349
+ onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
350
+ onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
351
+ onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
352
+ onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
353
+ onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
354
+ readonly childElementCount: number;
355
+ readonly children: HTMLCollection;
356
+ readonly firstElementChild: Element | null;
357
+ readonly lastElementChild: Element | null;
358
+ append: ((...nodes: (Node | string)[]) => void) & import("vitest-mock-extended").CalledWithMock<void, (string | Node)[]>;
359
+ prepend: ((...nodes: (Node | string)[]) => void) & import("vitest-mock-extended").CalledWithMock<void, (string | Node)[]>;
360
+ querySelector: {
361
+ <K extends keyof HTMLElementTagNameMap>(selectors: K): HTMLElementTagNameMap[K] | null;
362
+ <K extends keyof SVGElementTagNameMap>(selectors: K): SVGElementTagNameMap[K] | null;
363
+ <K extends keyof MathMLElementTagNameMap>(selectors: K): MathMLElementTagNameMap[K] | null;
364
+ <K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): HTMLElementDeprecatedTagNameMap[K] | null;
365
+ <E extends Element = Element>(selectors: string): E | null;
366
+ } & import("vitest-mock-extended").CalledWithMock<Element | null, [selectors: string]>;
367
+ querySelectorAll: {
368
+ <K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>;
369
+ <K extends keyof SVGElementTagNameMap>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>;
370
+ <K extends keyof MathMLElementTagNameMap>(selectors: K): NodeListOf<MathMLElementTagNameMap[K]>;
371
+ <K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>;
372
+ <E extends Element = Element>(selectors: string): NodeListOf<E>;
373
+ } & import("vitest-mock-extended").CalledWithMock<NodeListOf<Element>, [selectors: string]>;
374
+ replaceChildren: ((...nodes: (Node | string)[]) => void) & import("vitest-mock-extended").CalledWithMock<void, (string | Node)[]>;
375
+ createExpression: ((expression: string, resolver?: XPathNSResolver | null) => XPathExpression) & import("vitest-mock-extended").CalledWithMock<XPathExpression, [expression: string, resolver?: XPathNSResolver | null | undefined]>;
376
+ createNSResolver: ((nodeResolver: Node) => Node) & import("vitest-mock-extended").CalledWithMock<Node, [nodeResolver: Node]>;
377
+ evaluate: ((expression: string, contextNode: Node, resolver?: XPathNSResolver | null, type?: number, result?: XPathResult | null) => XPathResult) & import("vitest-mock-extended").CalledWithMock<XPathResult, [expression: string, contextNode: Node, resolver?: XPathNSResolver | null | undefined, type?: number | undefined, result?: XPathResult | null | undefined]>;
378
+ } & Document;
379
+ triggerVisibilityChange: () => void;
380
+ };