Aleksandr Aleksandrov 6 years ago
parent
commit
0a80d85efb
3 changed files with 20 additions and 19 deletions
  1. 1 1
      package.json
  2. 0 18
      src/element.ts
  3. 19 0
      src/watch.ts

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "@ex-helpers/element",
-  "version": "0.1.14",
+  "version": "0.1.15",
   "description": "Several element wrapper helpers",
   "scripts": {
     "build": "exb",

+ 0 - 18
src/element.ts

@@ -1,18 +0,0 @@
-declare module '@angular/core' {
-
-    class ElementRef<T = any> {
-        private _watchSizeCollection?: any;
-
-        nativeElement: T;
-
-        constructor(nativeElement: T);
-
-        watchSize?: (callback: (height: number, width: number) => void,
-                    options?: { attributes: boolean, childList: boolean, characterData: boolean },
-                    params?: { legacy: boolean, timeout?: number }) => () => void;
-
-        watchChanges?: (callback: MutationCallback, options: MutationObserverInit) => () => void;
-
-        triggerSizeCheck?: () => void;
-    }
-}

+ 19 - 0
src/watch.ts

@@ -4,6 +4,25 @@ import {IncrementalStackManager} from '@ex-helpers/stack';
 import {bounds} from './bounds';
 import './element';
 
+declare module '@angular/core' {
+
+    class ElementRef<T = any> {
+        private _watchSizeCollection?: any;
+
+        nativeElement: T;
+
+        constructor(nativeElement: T);
+
+        watchSize?: (callback: (height: number, width: number) => void,
+                     options?: { attributes: boolean, childList: boolean, characterData: boolean },
+                     params?: { legacy: boolean, timeout?: number }) => () => void;
+
+        watchChanges?: (callback: MutationCallback, options: MutationObserverInit) => () => void;
+
+        triggerSizeCheck?: () => void;
+    }
+}
+
 interface SizeCollectionItem {
     triggerCheck: () => void;
     startCountdown: () => void;