@stencil/core 2.16.1 → 2.17.2-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 (50) hide show
  1. package/cli/config-flags.d.ts +110 -0
  2. package/cli/index.cjs +710 -225
  3. package/cli/index.d.ts +2 -1
  4. package/cli/index.js +710 -225
  5. package/cli/package.json +1 -1
  6. package/compiler/package.json +1 -1
  7. package/compiler/stencil.js +905 -290
  8. package/compiler/stencil.min.js +2 -2
  9. package/dependencies.json +1 -1
  10. package/dev-server/client/index.js +1 -1
  11. package/dev-server/client/package.json +1 -1
  12. package/dev-server/connector.html +2 -2
  13. package/dev-server/index.js +1 -1
  14. package/dev-server/package.json +1 -1
  15. package/dev-server/server-process.js +2 -2
  16. package/internal/app-data/package.json +1 -1
  17. package/internal/client/css-shim.js +1 -1
  18. package/internal/client/dom.js +1 -1
  19. package/internal/client/index.js +11 -6
  20. package/internal/client/package.json +1 -1
  21. package/internal/client/patch-browser.js +1 -1
  22. package/internal/client/patch-esm.js +1 -1
  23. package/internal/client/shadow-css.js +1 -1
  24. package/internal/hydrate/index.js +2 -2
  25. package/internal/hydrate/package.json +1 -1
  26. package/internal/package.json +1 -1
  27. package/internal/stencil-private.d.ts +6 -2
  28. package/internal/stencil-public-compiler.d.ts +67 -48
  29. package/internal/testing/index.js +1 -1
  30. package/internal/testing/package.json +1 -1
  31. package/mock-doc/index.cjs +163 -5
  32. package/mock-doc/index.d.ts +86 -1
  33. package/mock-doc/index.js +163 -5
  34. package/mock-doc/package.json +1 -1
  35. package/package.json +2 -1
  36. package/screenshot/package.json +1 -1
  37. package/sys/node/index.js +325 -314
  38. package/sys/node/package.json +1 -1
  39. package/sys/node/worker.js +1 -1
  40. package/testing/index.d.ts +1 -1
  41. package/testing/index.js +445 -382
  42. package/testing/jest/jest-config.d.ts +1 -1
  43. package/testing/jest/jest-runner.d.ts +3 -2
  44. package/testing/jest/jest-screenshot.d.ts +1 -1
  45. package/testing/mocks.d.ts +48 -3
  46. package/testing/package.json +1 -1
  47. package/testing/puppeteer/puppeteer-browser.d.ts +2 -2
  48. package/testing/test/testing-utils.spec.d.ts +1 -0
  49. package/testing/testing-utils.d.ts +74 -2
  50. package/testing/testing.d.ts +2 -2
@@ -1,5 +1,6 @@
1
1
  import type { JsonDocs } from './stencil-public-docs';
2
2
  import type { PrerenderUrlResults } from '../internal';
3
+ import type { ConfigFlags } from '../cli/config-flags';
3
4
  export * from './stencil-public-docs';
4
5
  /**
5
6
  * https://stenciljs.com/docs/config/
@@ -356,6 +357,29 @@ declare type Loose<T extends Object> = Record<string, any> & Partial<T>;
356
357
  * and have type information carry though as we construct an object which is a valid `Config`.
357
358
  */
358
359
  export declare type UnvalidatedConfig = Loose<Config>;
360
+ /**
361
+ * Helper type to strip optional markers from keys in a type, while preserving other type information for the key.
362
+ * This type takes a union of keys, K, in type T to allow for the type T to be gradually updated.
363
+ *
364
+ * ```typescript
365
+ * type Foo { bar?: number, baz?: string }
366
+ * type ReqFieldFoo = RequireFields<Foo, 'bar'>; // { bar: number, baz?: string }
367
+ * ```
368
+ */
369
+ declare type RequireFields<T, K extends keyof T> = T & {
370
+ [P in K]-?: T[P];
371
+ };
372
+ /**
373
+ * Fields in {@link Config} to make required for {@link ValidatedConfig}
374
+ */
375
+ declare type StrictConfigFields = 'flags' | 'logger';
376
+ /**
377
+ * A version of {@link Config} that makes certain fields required. This type represents a valid configuration entity.
378
+ * When a configuration is received by the user, it is a bag of unverified data. In order to make stricter guarantees
379
+ * about the data from a type-safety perspective, this type is intended to be used throughout the codebase once
380
+ * validations have occurred at runtime.
381
+ */
382
+ export declare type ValidatedConfig = RequireFields<Config, StrictConfigFields>;
359
383
  export interface HydratedFlag {
360
384
  /**
361
385
  * Defaults to `hydrated`.
@@ -505,51 +529,6 @@ export interface DevServerEditor {
505
529
  supported?: boolean;
506
530
  priority?: number;
507
531
  }
508
- export interface ConfigFlags {
509
- task?: TaskCommand;
510
- args?: string[];
511
- knownArgs?: string[];
512
- unknownArgs?: string[];
513
- address?: string;
514
- build?: boolean;
515
- cache?: boolean;
516
- checkVersion?: boolean;
517
- ci?: boolean;
518
- compare?: boolean;
519
- config?: string;
520
- debug?: boolean;
521
- dev?: boolean;
522
- docs?: boolean;
523
- docsApi?: string;
524
- docsJson?: string;
525
- e2e?: boolean;
526
- emulate?: string;
527
- es5?: boolean;
528
- esm?: boolean;
529
- headless?: boolean;
530
- help?: boolean;
531
- log?: boolean;
532
- logLevel?: string;
533
- verbose?: boolean;
534
- maxWorkers?: number;
535
- open?: boolean;
536
- port?: number;
537
- prerender?: boolean;
538
- prod?: boolean;
539
- profile?: boolean;
540
- root?: string;
541
- screenshot?: boolean;
542
- screenshotConnector?: string;
543
- serve?: boolean;
544
- serviceWorker?: boolean;
545
- spec?: boolean;
546
- ssr?: boolean;
547
- stats?: boolean;
548
- updateScreenshot?: boolean;
549
- version?: boolean;
550
- watch?: boolean;
551
- devtools?: boolean;
552
- }
553
532
  export declare type TaskCommand = 'build' | 'docs' | 'generate' | 'g' | 'help' | 'info' | 'prerender' | 'serve' | 'telemetry' | 'test' | 'version';
554
533
  export declare type PageReloadStrategy = 'hmr' | 'pageReload' | null;
555
534
  /**
@@ -1653,7 +1632,29 @@ export interface EmulateViewport {
1653
1632
  */
1654
1633
  isLandscape?: boolean;
1655
1634
  }
1656
- export declare type LogLevel = 'debug' | 'info' | 'warn' | 'error' | string;
1635
+ /**
1636
+ * This sets the log level hierarchy for our terminal logger, ranging from
1637
+ * most to least verbose.
1638
+ *
1639
+ * Ordering the levels like this lets us easily check whether we should log a
1640
+ * message at a given time. For instance, if the log level is set to `'warn'`,
1641
+ * then anything passed to the logger with level `'warn'` or `'error'` should
1642
+ * be logged, but we should _not_ log anything with level `'info'` or `'debug'`.
1643
+ *
1644
+ * If we have a current log level `currentLevel` and a message with level
1645
+ * `msgLevel` is passed to the logger, we can determine whether or not we should
1646
+ * log it by checking if the log level on the message is further up or at the
1647
+ * same level in the hierarchy than `currentLevel`, like so:
1648
+ *
1649
+ * ```ts
1650
+ * LOG_LEVELS.indexOf(msgLevel) >= LOG_LEVELS.indexOf(currentLevel)
1651
+ * ```
1652
+ *
1653
+ * NOTE: for the reasons described above, do not change the order of the entries
1654
+ * in this array without good reason!
1655
+ */
1656
+ export declare const LOG_LEVELS: readonly ["debug", "info", "warn", "error"];
1657
+ export declare type LogLevel = typeof LOG_LEVELS[number];
1657
1658
  /**
1658
1659
  * Common logger to be used by the compiler, dev-server and CLI. The CLI will use a
1659
1660
  * NodeJS based console logging and colors, and the web will use browser based
@@ -1980,7 +1981,7 @@ export interface LoadConfigInit {
1980
1981
  * operations around the codebase.
1981
1982
  */
1982
1983
  export interface LoadConfigResults {
1983
- config: UnvalidatedConfig;
1984
+ config: ValidatedConfig;
1984
1985
  diagnostics: Diagnostic[];
1985
1986
  tsconfig: {
1986
1987
  path: string;
@@ -2048,14 +2049,32 @@ export interface PrerenderResults {
2048
2049
  duration: number;
2049
2050
  average: number;
2050
2051
  }
2052
+ /**
2053
+ * Input for CSS optimization functions, including the input CSS
2054
+ * string and a few boolean options which turn on or off various
2055
+ * optimizations.
2056
+ */
2051
2057
  export interface OptimizeCssInput {
2052
2058
  input: string;
2053
2059
  filePath?: string;
2054
- autoprefixer?: any;
2060
+ autoprefixer?: boolean | null | AutoprefixerOptions;
2055
2061
  minify?: boolean;
2056
2062
  sourceMap?: boolean;
2057
2063
  resolveUrl?: (url: string) => Promise<string> | string;
2058
2064
  }
2065
+ /**
2066
+ * This is not a real interface describing the options which can
2067
+ * be passed to autoprefixer, for that see the docs, here:
2068
+ * https://github.com/postcss/autoprefixer#options
2069
+ *
2070
+ * Instead, this basically just serves as a label type to track
2071
+ * that arguments are being passed consistently.
2072
+ */
2073
+ export declare type AutoprefixerOptions = Object;
2074
+ /**
2075
+ * Output from CSS optimization functions, wrapping up optimized
2076
+ * CSS and any diagnostics produced during optimization.
2077
+ */
2059
2078
  export interface OptimizeCssOutput {
2060
2079
  output: string;
2061
2080
  diagnostics: Diagnostic[];
@@ -1089,5 +1089,5 @@ exports.setMode = e => modeResolutionChain.push(e), exports.setPlatformHelpers =
1089
1089
  }), 100));
1090
1090
  }));
1091
1091
  }, exports.stopAutoApplyChanges = stopAutoApplyChanges, exports.styles = styles,
1092
- exports.supportsConstructibleStylesheets = !1, exports.supportsListenerOptions = !0,
1092
+ exports.supportsConstructableStylesheets = !1, exports.supportsListenerOptions = !0,
1093
1093
  exports.win = win, exports.writeTask = writeTask;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/testing",
3
- "version": "2.16.1",
3
+ "version": "2.17.2-0",
4
4
  "description": "Stencil internal testing platform to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.",
5
5
  "main": "./index.js",
6
6
  "private": true
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Mock Doc (CommonJS) v2.16.1 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc (CommonJS) v2.17.2-0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  var mockDoc = (function(exports) {
5
5
  'use strict';
@@ -689,6 +689,25 @@ class MockMouseEvent extends MockEvent {
689
689
  }
690
690
  }
691
691
  }
692
+ class MockUIEvent extends MockEvent {
693
+ constructor(type, uiEventInitDic) {
694
+ super(type);
695
+ this.detail = null;
696
+ this.view = null;
697
+ if (uiEventInitDic != null) {
698
+ Object.assign(this, uiEventInitDic);
699
+ }
700
+ }
701
+ }
702
+ class MockFocusEvent extends MockUIEvent {
703
+ constructor(type, focusEventInitDic) {
704
+ super(type);
705
+ this.relatedTarget = null;
706
+ if (focusEventInitDic != null) {
707
+ Object.assign(this, focusEventInitDic);
708
+ }
709
+ }
710
+ }
692
711
  class MockEventListener {
693
712
  constructor(type, handler) {
694
713
  this.type = type;
@@ -1601,6 +1620,9 @@ class MockElement extends MockNode {
1601
1620
  this.shadowRoot = shadowRoot;
1602
1621
  return shadowRoot;
1603
1622
  }
1623
+ blur() {
1624
+ dispatchEvent(this, new MockFocusEvent('blur', { relatedTarget: null, bubbles: true, cancelable: true, composed: true }));
1625
+ }
1604
1626
  get shadowRoot() {
1605
1627
  return this.__shadowRoot || null;
1606
1628
  }
@@ -1669,6 +1691,9 @@ class MockElement extends MockNode {
1669
1691
  get firstElementChild() {
1670
1692
  return this.children[0] || null;
1671
1693
  }
1694
+ focus(_options) {
1695
+ dispatchEvent(this, new MockFocusEvent('focus', { relatedTarget: null, bubbles: true, cancelable: true, composed: true }));
1696
+ }
1672
1697
  getAttribute(attrName) {
1673
1698
  if (attrName === 'style') {
1674
1699
  if (this.__style != null && this.__style.length > 0) {
@@ -2572,7 +2597,28 @@ function createElementNS(ownerDocument, namespaceURI, tagName) {
2572
2597
  return createElement(ownerDocument, tagName);
2573
2598
  }
2574
2599
  else if (namespaceURI === 'http://www.w3.org/2000/svg') {
2575
- return new MockSVGElement(ownerDocument, tagName);
2600
+ switch (tagName.toLowerCase()) {
2601
+ case 'text':
2602
+ case 'tspan':
2603
+ case 'tref':
2604
+ case 'altglyph':
2605
+ case 'textpath':
2606
+ return new MockSVGTextContentElement(ownerDocument, tagName);
2607
+ case 'circle':
2608
+ case 'ellipse':
2609
+ case 'image':
2610
+ case 'line':
2611
+ case 'path':
2612
+ case 'polygon':
2613
+ case 'polyline':
2614
+ case 'rect':
2615
+ case 'use':
2616
+ return new MockSVGGraphicsElement(ownerDocument, tagName);
2617
+ case 'svg':
2618
+ return new MockSVGSVGElement(ownerDocument, tagName);
2619
+ default:
2620
+ return new MockSVGElement(ownerDocument, tagName);
2621
+ }
2576
2622
  }
2577
2623
  else {
2578
2624
  return new MockElement(ownerDocument, tagName);
@@ -2719,6 +2765,98 @@ class MockScriptElement extends MockHTMLElement {
2719
2765
  patchPropAttributes(MockScriptElement.prototype, {
2720
2766
  type: String,
2721
2767
  });
2768
+ class MockDOMMatrix {
2769
+ constructor() {
2770
+ this.a = 1;
2771
+ this.b = 0;
2772
+ this.c = 0;
2773
+ this.d = 1;
2774
+ this.e = 0;
2775
+ this.f = 0;
2776
+ this.m11 = 1;
2777
+ this.m12 = 0;
2778
+ this.m13 = 0;
2779
+ this.m14 = 0;
2780
+ this.m21 = 0;
2781
+ this.m22 = 1;
2782
+ this.m23 = 0;
2783
+ this.m24 = 0;
2784
+ this.m31 = 0;
2785
+ this.m32 = 0;
2786
+ this.m33 = 1;
2787
+ this.m34 = 0;
2788
+ this.m41 = 0;
2789
+ this.m42 = 0;
2790
+ this.m43 = 0;
2791
+ this.m44 = 1;
2792
+ this.is2D = true;
2793
+ this.isIdentity = true;
2794
+ }
2795
+ static fromMatrix() {
2796
+ return new MockDOMMatrix();
2797
+ }
2798
+ inverse() {
2799
+ return new MockDOMMatrix();
2800
+ }
2801
+ flipX() {
2802
+ return new MockDOMMatrix();
2803
+ }
2804
+ flipY() {
2805
+ return new MockDOMMatrix();
2806
+ }
2807
+ multiply() {
2808
+ return new MockDOMMatrix();
2809
+ }
2810
+ rotate() {
2811
+ return new MockDOMMatrix();
2812
+ }
2813
+ rotateAxisAngle() {
2814
+ return new MockDOMMatrix();
2815
+ }
2816
+ rotateFromVector() {
2817
+ return new MockDOMMatrix();
2818
+ }
2819
+ scale() {
2820
+ return new MockDOMMatrix();
2821
+ }
2822
+ scaleNonUniform() {
2823
+ return new MockDOMMatrix();
2824
+ }
2825
+ skewX() {
2826
+ return new MockDOMMatrix();
2827
+ }
2828
+ skewY() {
2829
+ return new MockDOMMatrix();
2830
+ }
2831
+ toJSON() { }
2832
+ toString() { }
2833
+ transformPoint() {
2834
+ return new MockDOMPoint();
2835
+ }
2836
+ translate() {
2837
+ return new MockDOMMatrix();
2838
+ }
2839
+ }
2840
+ class MockDOMPoint {
2841
+ constructor() {
2842
+ this.w = 1;
2843
+ this.x = 0;
2844
+ this.y = 0;
2845
+ this.z = 0;
2846
+ }
2847
+ toJSON() { }
2848
+ matrixTransform() {
2849
+ return new MockDOMMatrix();
2850
+ }
2851
+ }
2852
+ class MockSVGRect {
2853
+ constructor() {
2854
+ this.height = 10;
2855
+ this.width = 10;
2856
+ this.x = 0;
2857
+ this.y = 0;
2858
+ }
2859
+ }
2722
2860
  class MockStyleElement extends MockHTMLElement {
2723
2861
  constructor(ownerDocument) {
2724
2862
  super(ownerDocument, 'style');
@@ -2751,9 +2889,6 @@ class MockSVGElement extends MockElement {
2751
2889
  get viewportElement() {
2752
2890
  return null;
2753
2891
  }
2754
- focus() {
2755
- /**/
2756
- }
2757
2892
  onunload() {
2758
2893
  /**/
2759
2894
  }
@@ -2771,6 +2906,27 @@ class MockSVGElement extends MockElement {
2771
2906
  return 0;
2772
2907
  }
2773
2908
  }
2909
+ class MockSVGGraphicsElement extends MockSVGElement {
2910
+ getBBox(_options) {
2911
+ return new MockSVGRect();
2912
+ }
2913
+ getCTM() {
2914
+ return new MockDOMMatrix();
2915
+ }
2916
+ getScreenCTM() {
2917
+ return new MockDOMMatrix();
2918
+ }
2919
+ }
2920
+ class MockSVGSVGElement extends MockSVGGraphicsElement {
2921
+ createSVGPoint() {
2922
+ return new MockDOMPoint();
2923
+ }
2924
+ }
2925
+ class MockSVGTextContentElement extends MockSVGGraphicsElement {
2926
+ getComputedTextLength() {
2927
+ return 0;
2928
+ }
2929
+ }
2774
2930
  class MockBaseElement extends MockHTMLElement {
2775
2931
  constructor(ownerDocument) {
2776
2932
  super(ownerDocument, 'base');
@@ -3296,6 +3452,7 @@ const WINDOW_PROPS = [
3296
3452
  'HTMLElement',
3297
3453
  'Node',
3298
3454
  'NodeList',
3455
+ 'FocusEvent',
3299
3456
  'KeyboardEvent',
3300
3457
  'MouseEvent',
3301
3458
  ];
@@ -3303,6 +3460,7 @@ const GLOBAL_CONSTRUCTORS = [
3303
3460
  ['CustomEvent', MockCustomEvent],
3304
3461
  ['Event', MockEvent],
3305
3462
  ['Headers', MockHeaders],
3463
+ ['FocusEvent', MockFocusEvent],
3306
3464
  ['KeyboardEvent', MockKeyboardEvent],
3307
3465
  ['MouseEvent', MockMouseEvent],
3308
3466
  ['Request', MockRequest],
@@ -199,6 +199,62 @@ declare class MockScriptElement extends MockHTMLElement {
199
199
  get src(): string;
200
200
  set src(value: string);
201
201
  }
202
+ declare class MockDOMMatrix {
203
+ static fromMatrix(): MockDOMMatrix;
204
+ a: number;
205
+ b: number;
206
+ c: number;
207
+ d: number;
208
+ e: number;
209
+ f: number;
210
+ m11: number;
211
+ m12: number;
212
+ m13: number;
213
+ m14: number;
214
+ m21: number;
215
+ m22: number;
216
+ m23: number;
217
+ m24: number;
218
+ m31: number;
219
+ m32: number;
220
+ m33: number;
221
+ m34: number;
222
+ m41: number;
223
+ m42: number;
224
+ m43: number;
225
+ m44: number;
226
+ is2D: boolean;
227
+ isIdentity: boolean;
228
+ inverse(): MockDOMMatrix;
229
+ flipX(): MockDOMMatrix;
230
+ flipY(): MockDOMMatrix;
231
+ multiply(): MockDOMMatrix;
232
+ rotate(): MockDOMMatrix;
233
+ rotateAxisAngle(): MockDOMMatrix;
234
+ rotateFromVector(): MockDOMMatrix;
235
+ scale(): MockDOMMatrix;
236
+ scaleNonUniform(): MockDOMMatrix;
237
+ skewX(): MockDOMMatrix;
238
+ skewY(): MockDOMMatrix;
239
+ toJSON(): void;
240
+ toString(): void;
241
+ transformPoint(): MockDOMPoint;
242
+ translate(): MockDOMMatrix;
243
+ }
244
+ declare class MockDOMPoint {
245
+ w: number;
246
+ x: number;
247
+ y: number;
248
+ z: number;
249
+ toJSON(): void;
250
+ matrixTransform(): MockDOMMatrix;
251
+ }
252
+ declare class MockSVGRect {
253
+ height: number;
254
+ width: number;
255
+ x: number;
256
+ y: number;
257
+ }
202
258
  declare class MockStyleElement extends MockHTMLElement {
203
259
  sheet: MockCSSStyleSheet;
204
260
  constructor(ownerDocument: any);
@@ -212,13 +268,28 @@ declare class MockStyleElement extends MockHTMLElement {
212
268
  declare class MockSVGElement extends MockElement {
213
269
  get ownerSVGElement(): SVGSVGElement;
214
270
  get viewportElement(): SVGElement;
215
- focus(): void;
216
271
  onunload(): void;
217
272
  get pathLength(): number;
218
273
  isPointInFill(_pt: DOMPoint): boolean;
219
274
  isPointInStroke(_pt: DOMPoint): boolean;
220
275
  getTotalLength(): number;
221
276
  }
277
+ declare class MockSVGGraphicsElement extends MockSVGElement {
278
+ getBBox(_options?: {
279
+ clipped: boolean;
280
+ fill: boolean;
281
+ markers: boolean;
282
+ stroke: boolean;
283
+ }): MockSVGRect;
284
+ getCTM(): MockDOMMatrix;
285
+ getScreenCTM(): MockDOMMatrix;
286
+ }
287
+ declare class MockSVGSVGElement extends MockSVGGraphicsElement {
288
+ createSVGPoint(): MockDOMPoint;
289
+ }
290
+ declare class MockSVGTextContentElement extends MockSVGGraphicsElement {
291
+ getComputedTextLength(): number;
292
+ }
222
293
  declare class MockBaseElement extends MockHTMLElement {
223
294
  constructor(ownerDocument: any);
224
295
  get href(): string;
@@ -315,6 +386,15 @@ declare class MockMouseEvent extends MockEvent {
315
386
  relatedTarget: EventTarget;
316
387
  constructor(type: string, mouseEventInitDic?: MouseEventInit);
317
388
  }
389
+ declare class MockUIEvent extends MockEvent {
390
+ detail: number | null;
391
+ view: MockWindow | null;
392
+ constructor(type: string, uiEventInitDic?: UIEventInit);
393
+ }
394
+ declare class MockFocusEvent extends MockUIEvent {
395
+ relatedTarget: EventTarget | null;
396
+ constructor(type: 'blur' | 'focus', focusEventInitDic?: FocusEventInit);
397
+ }
318
398
  declare class MockEventListener {
319
399
  type: string;
320
400
  handler: (ev?: any) => void;
@@ -438,6 +518,7 @@ declare class MockElement extends MockNode {
438
518
  constructor(ownerDocument: any, nodeName: string);
439
519
  addEventListener(type: string, handler: (ev?: any) => void): void;
440
520
  attachShadow(_opts: ShadowRootInit): any;
521
+ blur(): void;
441
522
  get shadowRoot(): any;
442
523
  set shadowRoot(shadowRoot: any);
443
524
  get attributes(): MockAttributeMap;
@@ -455,6 +536,9 @@ declare class MockElement extends MockNode {
455
536
  set dir(value: string);
456
537
  dispatchEvent(ev: MockEvent): boolean;
457
538
  get firstElementChild(): MockElement | null;
539
+ focus(_options?: {
540
+ preventScroll?: boolean;
541
+ }): void;
458
542
  getAttribute(attrName: string): any;
459
543
  getAttributeNS(namespaceURI: string, attrName: string): string;
460
544
  getBoundingClientRect(): {
@@ -758,6 +842,7 @@ declare class MockWindow {
758
842
  CustomEvent: typeof MockCustomEvent;
759
843
  Event: typeof MockEvent;
760
844
  Headers: typeof MockHeaders;
845
+ FocusEvent: typeof MockFocusEvent;
761
846
  KeyboardEvent: typeof MockKeyboardEvent;
762
847
  MouseEvent: typeof MockMouseEvent;
763
848
  constructor(html?: string | boolean);