refactor: replace var usage with let/const (#7064)

This commit is contained in:
Manol Donev
2019-03-25 18:09:14 +02:00
committed by GitHub
parent 34fe24732d
commit b436ecde36
75 changed files with 1093 additions and 1085 deletions

View File

@@ -177,7 +177,7 @@ const profileMethodUnnamed = (target, key, descriptor) => {
if (descriptor === undefined) {
descriptor = Object.getOwnPropertyDescriptor(target, key);
}
var originalMethod = descriptor.value;
const originalMethod = descriptor.value;
let className = "";
if (target && target.constructor && target.constructor.name) {
@@ -199,7 +199,7 @@ const profileStaticMethodUnnamed = (ctor, key, descriptor) => {
if (descriptor === undefined) {
descriptor = Object.getOwnPropertyDescriptor(ctor, key);
}
var originalMethod = descriptor.value;
const originalMethod = descriptor.value;
let className = "";
if (ctor && ctor.name) {
@@ -222,7 +222,7 @@ function profileMethodNamed(name: string): MethodDecorator {
if (descriptor === undefined) {
descriptor = Object.getOwnPropertyDescriptor(target, key);
}
var originalMethod = descriptor.value;
const originalMethod = descriptor.value;
//editing the descriptor/value parameter
descriptor.value = profileFunctionFactory(originalMethod, name);