Adam Shaw 6 лет назад
Родитель
Сommit
54a065a4b8
3 измененных файлов с 5 добавлено и 2 удалено
  1. 2 1
      package.json
  2. 2 0
      packages/__tests__/src/lib/simulate.js
  3. 1 1
      packages/core/src/util/dom-manip.ts

+ 2 - 1
package.json

@@ -53,6 +53,7 @@
     "@types/jasmine-jquery": "^1.5.33",
     "@types/jquery": "^3.3.29",
     "@types/luxon": "^1.12.0",
+    "@types/node": "^12.12.14",
     "bootstrap": "^3.4.1",
     "chokidar": "^2.1.5",
     "components-jqueryui": "github:components/jqueryui",
@@ -103,7 +104,7 @@
     "tslib": "^1.9.3",
     "tslint": "^5.16.0",
     "tslint-config-standard": "^8.0.1",
-    "typescript": "^3.5.3",
+    "typescript": "^3.7.3",
     "xhr-mock": "^2.4.1"
   },
   "dependencies": {

+ 2 - 0
packages/__tests__/src/lib/simulate.js

@@ -35,6 +35,8 @@ $.simulate.prototype.simulateEvent = function(elem, type, options) {
 
 $.simulate.prototype.simulateWindowResize = function() {
   // from https://stackoverflow.com/a/1818513/96342
+
+  /** @type {any} */
   let event
 
   if (typeof Event !== 'undefined') {

+ 1 - 1
packages/core/src/util/dom-manip.ts

@@ -108,7 +108,7 @@ const closestMethod = Element.prototype.closest || function(selector) {
 }
 
 export function elementClosest(el: HTMLElement, selector: string): HTMLElement {
-  return closestMethod.call(el, selector)
+  return (closestMethod as any).call(el, selector)
 }
 
 export function elementMatches(el: HTMLElement, selector: string): HTMLElement {