codecharta-visualization 2.5.0 → 2.5.2

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.
@@ -57,12 +57,14 @@ if (typeof Blob.prototype.arrayBuffer === "undefined") {
57
57
  // Without zone.js swallowing the thrown error, components calling popover.matches(":popover-open")
58
58
  // would fail tests. Make the selector match nothing and stub the popover methods.
59
59
  const originalElementMatches = Element.prototype.matches
60
- Element.prototype.matches = function (selectors: string): boolean {
60
+ // Cast because the native signature is a set of overloads that narrow the receiver, and a function
61
+ // literal cannot express a type predicate — the shim stands in for all of them.
62
+ Element.prototype.matches = function (this: Element, selectors: string): boolean {
61
63
  if (selectors === ":popover-open") {
62
64
  return false
63
65
  }
64
66
  return originalElementMatches.call(this, selectors)
65
- }
67
+ } as typeof Element.prototype.matches
66
68
  if (typeof HTMLElement.prototype.showPopover === "undefined") {
67
69
  HTMLElement.prototype.showPopover = function () {}
68
70
  }