Skip to content

Commit

Permalink
chore(*): Fix lint warnings (#2915)
Browse files Browse the repository at this point in the history
  • Loading branch information
Borislav Kulov committed Dec 18, 2018
1 parent 25b5cfb commit 808603d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions projects/igniteui-angular/src/lib/core/deprecateDecorators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import { isDevMode } from '@angular/core';
* @hidden
*/
export function DeprecateMethod(message: string): MethodDecorator {
var isMessageShown = false;
let isMessageShown = false;

return function (target: any, key: string, descriptor: PropertyDescriptor) {
if (descriptor && descriptor.value) {
const originalMethod = descriptor.value;

descriptor.value = function () {
if (!isMessageShown && isDevMode()) {
const targetName = typeof target === "function" ? target.name : target.constructor.name;
const targetName = typeof target === 'function' ? target.name : target.constructor.name;
isMessageShown = true;

console.warn(`${targetName}.${key}: ${message}`);
Expand All @@ -23,15 +23,15 @@ export function DeprecateMethod(message: string): MethodDecorator {

return descriptor;
}
}
};
}

/**
* @hidden
*/
export function DeprecateProperty(message: string): PropertyDecorator {
return function(target: any, key: string) {
var isMessageShown = false;
let isMessageShown = false;

// use backing field to set/get the value of the property to ensure there won't be infinite recursive calls
const newKey = generateUniqueKey(target, key);
Expand All @@ -49,7 +49,7 @@ export function DeprecateProperty(message: string): PropertyDecorator {
return this[newKey];
}
});
}
};
}

/**
Expand Down

0 comments on commit 808603d

Please sign in to comment.