diff --git a/.editorconfig b/.editorconfig index 76a93c06..4a8457ba 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,3 +1,4 @@ [*] indent_style = space indent_size = 2 +insert_final_newline = true \ No newline at end of file diff --git a/lib/external.ts b/lib/external.ts index 9efb9c7d..f3688b69 100644 --- a/lib/external.ts +++ b/lib/external.ts @@ -14,7 +14,13 @@ export function External(...args: any[]): ClassDecor }; (constructor as any).displayName = (target as any).name; Object.getOwnPropertyNames(target) - .filter(prop => !(constructor as any)[prop] && prop !== 'name' && prop !== 'length') + .filter(prop => + prop !== 'name' && + prop !== 'length' && + prop !== 'caller' && + prop !== 'callee' && + prop !== 'arguments' && + !(constructor as any)[prop]) .forEach(prop => (constructor as any)[prop] = (target as any)[prop]); constructor.prototype = target.prototype; return constructor as any;