From 10952de3c5fd356a9abe5b3dfb8f73d64379de31 Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Thu, 1 Apr 2021 22:24:22 +0200 Subject: [PATCH] Remove lazyProperties -> we use withLazyProperties instead --- ts/lib/lazy.ts | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/ts/lib/lazy.ts b/ts/lib/lazy.ts index d0c758e57..6507cefe2 100644 --- a/ts/lib/lazy.ts +++ b/ts/lib/lazy.ts @@ -1,29 +1,3 @@ -export function lazyProperties( - object: Record, - properties: Record unknown> -): void { - const propertyDescriptorMap = Object.entries(properties) - .map(([name, getter]: [string, () => unknown]): [ - string, - PropertyDescriptor - ] => [ - name, - { - get: getter, - enumerable: true, - }, - ]) - .reduce( - ( - accumulator: PropertyDescriptorMap, - [name, property] - ): PropertyDescriptorMap => ((accumulator[name] = property), accumulator), - {} - ); - - Object.defineProperties(object, propertyDescriptorMap); -} - export function withLazyProperties( object: Record, properties: Record unknown>