Browse Source

tslint fix

sanex3339 8 năm trước cách đây
mục cha
commit
4f02abb517
1 tập tin đã thay đổi với 5 bổ sung3 xóa
  1. 5 3
      src/decorators/Initializable.ts

+ 5 - 3
src/decorators/Initializable.ts

@@ -1,3 +1,5 @@
+/* tslint:disable:no-invalid-this */
+
 import { IInitializable } from '../interfaces/IInitializable';
 
 /**
@@ -22,7 +24,7 @@ export function initializable (
         };
         const originalMethod: Function = methodDescriptor.value;
 
-        methodDescriptor.value = function () {
+        methodDescriptor.value = function (): void {
             originalMethod.apply(this, arguments);
 
             // call property getter to activate initialization check inside it
@@ -45,12 +47,12 @@ export function initializable (
             return this[metadataPropertyKey];
         };
 
-        propertyDescriptor.set = function (newVal: any) {
+        propertyDescriptor.set = function (newVal: any): void {
             this[metadataPropertyKey] = newVal;
         };
 
         Object.defineProperty(target, propertyKey, propertyDescriptor);
 
         return propertyDescriptor;
-    }
+    };
 }