UNPKG

@angular-package/property

Version:
1 lines 38.3 kB
{"version":3,"file":"angular-package-property.mjs","sources":["../../../packages/property/src/callback/src/error-callback.function.ts","../../../packages/property/src/callback/src/callback.object.ts","../../../packages/property/src/descriptor/lib/accessor-descriptors.class.ts","../../../packages/property/src/descriptor/lib/data-descriptors.class.ts","../../../packages/property/src/descriptor/lib/descriptor.class.ts","../../../packages/property/src/descriptor/lib/descriptors.class.ts","../../../packages/property/src/lib/wrap-property.class.ts","../../../packages/property/src/lib/property.class.ts"],"sourcesContent":["// Type.\nimport { ErrorCallback } from '../type/error-callback.type';\nimport { ResultCallback } from '../../descriptor/type/result-callback.type';\n\n/**\n * Wrapper for the `ResultCallback` type function to throw an `Error` with the specified message on the specified `false` or `true` state.\n * @param message The string type value for the `Error` instance.\n * @param on A `boolean` state on which an `Error` should be thrown.\n * @returns The return value is a `boolean` as the result of the check.\n */\nexport const errorCallback: ErrorCallback = (\n message: string,\n on: boolean = false\n): ResultCallback => {\n return (result: boolean, value: any): boolean => {\n if (result === on) {\n throw new Error(\n `${message}, got value ${\n typeof value === 'object' ? JSON.stringify(value) : value\n }`\n );\n }\n return result;\n };\n};\n","// Function.\nimport { errorCallback } from './error-callback.function';\n// Interface.\nimport { Callbacks } from '../interface/callbacks.interface';\n/**\n * Object with all necessary callbacks for the property package.\n */\nexport const callbacks: Callbacks = {\n accessor: errorCallback(`Accessor descriptor must be an \\`ThisAccessorDescriptor<Value, Obj>\\` type`),\n data: errorCallback(`Data descriptor must be an \\`DataDescriptors<Value>\\` type`),\n descriptor: errorCallback(`Any kind of descriptor was not found`),\n};\n","// Class.\nimport { Property } from '../../lib';\n\n// Callback.\nimport { callbacks } from '../../callback/src/callback.object';\n\n// Type.\nimport { ResultCallback } from '../type/result-callback.type';\nimport { ThisAccessorDescriptor } from '../type/this-accessor-descriptor.type';\n\n/**\n * Strictly defines, sets, and stores privately single property accessor descriptor of a `ThisAccessorDescriptor<Value, Obj>` type.\n * Features:\n * + Guarded process of defining the object descriptor, but properties are not being checked against proper values.\n * + Strictly defines property accessor descriptor.\n * + Strictly sets, and stores at the same time single property accessor descriptor.\n * + Accessor descriptor is of a `ThisAccessorDescriptor<Value, Obj>` type:\n * - The return value of the `get()` function is of a generic `Value` type.\n * - The parameter of the `set()` function is of a generic `Value` type.\n * - Keyword `this` refers to an `Obj` variable in both `get()` and `set()` functions.\n * Methods `set()` and `define()` picks `configurable`, `enumerable`, `get`, `set` properties from the provided data.\n * Get privately stored accessor descriptor defined by the `set()` method.\n */\nexport class AccessorDescriptors<Value, Obj extends object> {\n /**\n * Returns strictly defined accessor descriptor of a `ThisAccessorDescriptor<Value, Obj>` type on `get` or `set` property detected.\n * @param descriptor An `object` of a `ThisAccessorDescriptor<Value, Obj>` type, to define with the default values of the\n * `CommonDescriptor`.\n * @param callback A `ResultCallback` function to handle the result of the check whether or not the `descriptor` is an `object`\n * with `get` or `set` property, by default it uses `accessorCallback()` function.\n * @throws Throws an error if the descriptor is not an object of a `ThisAccessorDescriptor<Value, Obj>` type, which means it\n * doesn't contain `get` or `set` property.\n * @returns The return value is an `object` of a `ThisAccessorDescriptor<Value, Obj>` type.\n */\n public static define<Value, Obj extends object = object>(\n descriptor: ThisAccessorDescriptor<Value, Obj>,\n callback: ResultCallback = callbacks['accessor']\n ): ThisAccessorDescriptor<Value, Obj> {\n const result = {\n ...{\n configurable: true,\n enumerable: true,\n },\n ...Property.pick(descriptor, 'configurable', 'enumerable', 'get', 'set')\n };\n callback && callback(typeof result === 'object', result);\n return result;\n }\n\n /**\n * Get privately stored accessor descriptor of a `ThisAccessorDescriptor<Value, Obj>` type defined by the `set()` method.\n */\n get get(): ThisAccessorDescriptor<Value, Obj> {\n return this.#descriptor;\n }\n\n // Single private accessor descriptor.\n #descriptor: ThisAccessorDescriptor<Value, Obj> = {\n configurable: true,\n enumerable: true,\n };\n\n /**\n * Creates an instance, and optionally sets an accessor descriptor of a `ThisAccessorDescriptor<Value, Obj>` type.\n * @param descriptor An optional `object` of a `ThisAccessorDescriptor<Value, Obj>` type to initially set accessor descriptor.\n */\n constructor(\n descriptor?: ThisAccessorDescriptor<Value, Obj>,\n callback?: ResultCallback\n ) {\n descriptor && this.set(descriptor, callback);\n }\n\n /**\n * Guards the `descriptor` to be an `object` of a `ThisAccessorDescriptor<Value, Obj>` type.\n * @param descriptor The object of a `ThisAccessorDescriptor<Value, Obj>` type to guard.\n * @param callback A `ResultCallback` function to handle the result of the check whether or not the descriptor is an `object`\n * containing the `get` or `set` property.\n * @throws Throws an error if the descriptor is not an object of a `ThisAccessorDescriptor<Value, Obj>` type, which means it\n * doesn't contain `get` or `set` property.\n * @returns The return value is a boolean indicating whether the `descriptor` is an `object` with the `get` or `set` property.\n */\n static guard<Value, Obj extends object>(\n descriptor: ThisAccessorDescriptor<Value, Obj>,\n callback: ResultCallback = callbacks['accessor']\n ): descriptor is ThisAccessorDescriptor<Value, Obj> {\n let result = true;\n Object\n .keys(descriptor)\n .forEach(key => (result === true) && (result = key in {\n 'configurable': true, 'enumerable': true, 'get': true, 'set': true\n }));\n return callback(result, descriptor);\n }\n\n /**\n * Strictly sets with the last saved descriptor values, and stores privately single accessor descriptor.\n * Strictly means, method picks `configurable`, `enumerable`, `get`, `set` properties from the `descriptor` to set.\n * @param descriptor An `object` of a `ThisAccessorDescriptor<Value, Obj>` type, to set with the last saved descriptor.\n * @param callback An optional `ResultCallback` function to handle the result of the check whether or not the descriptor is an `object`\n * containing the `get` or `set` property, by default it uses `accessorCallback()` from the static `guard()` method.\n * @throws Throws an error if the descriptor is not an object of a `ThisAccessorDescriptor<Value, Obj>` type, which means it\n * doesn't contain `get` or `set` property.\n * @returns The return value is the `AccessorDescriptors` instance for the chaining.\n */\n public set(\n descriptor: ThisAccessorDescriptor<Value, Obj>,\n callback?: ResultCallback\n ): this {\n this.#descriptor = AccessorDescriptors.define(descriptor, callback);\n return this;\n }\n}\n","// Class.\nimport { Property } from '../../lib';\n// Callback.\nimport { callbacks } from '../../callback/src/callback.object';\n// Interface.\nimport { DataDescriptor } from '../interface/data-descriptor.interface';\n// Type.\nimport { ResultCallback } from '../type/result-callback.type';\n\n/**\n * Strictly defines, sets, and stores privately property data descriptor of a `DataDescriptor<Value>` interface.\n * Features:\n * + Data descriptor is of a `DataDescriptor<Value>` interface:\n * - The `value` property is of a generic `Value` type.\n * + Guarded process of defining the object descriptor, but properties are not being checked against proper values.\n * + Strictly defines property data descriptor.\n * + Strictly sets, and stores at the same time property data descriptor.\n * + Method `set()` of the instance and static `define()` picks `configurable`, `enumerable`, `writable`, `value` properties from the\n * provided data.\n * + Get privately stored data descriptor defined by the `set()` method of the instance.\n */\nexport class DataDescriptors<Value> {\n /**\n * Returns strictly defined data descriptor of a `DataDescriptor<Value>` interface on `writable` or `value` property detected.\n * Strictly means, parameter `descriptor` is type guarded and method picks `configurable`, `enumerable`, `writable`, `value`\n * properties from the provided `descriptor` object.\n * @param descriptor An `object` of a `DataDescriptor<Value>` interface, to set with the default values of the\n * `CommonDescriptor`.\n * @param callback An optional `ResultCallback` function to handle the result of the check whether or not the `descriptor` is an `object`\n * with the `writable` or `value` property, by default it uses `dataCallback()` function from the static `guard()` method.\n * @returns The return value is an `object` of a `DataDescriptor<Value>` interface.\n */\n static define<Value>(\n descriptor: DataDescriptor<Value>,\n callback?: ResultCallback\n ): DataDescriptor<Value> {\n const result = {\n ...{\n configurable: true,\n enumerable: true,\n },\n ...Property.pick(descriptor, 'configurable', 'enumerable', 'writable', 'value')\n };\n callback && callback(typeof result === 'object', result);\n return result;\n }\n\n /**\n * Get privately stored data descriptor of a `DataDescriptor<Value>` interface defined by the `set()` method.\n */\n get get(): DataDescriptor<Value> {\n return this.#descriptor;\n }\n\n // Defaults to data descriptor.\n #descriptor: DataDescriptor<Value> = {\n configurable: true,\n enumerable: true,\n writable: true,\n value: undefined,\n };\n\n /**\n * Creates instance, and optionally set data descriptor of a `DataDescriptor<Value>` interface.\n * @param descriptor An optional `object` of a `DataDescriptor<Value>` interface to initially set.\n */\n constructor(descriptor?: DataDescriptor<Value>) {\n descriptor && this.set(descriptor);\n }\n\n /**\n * Guards the `descriptor` to be an `object` of a `DataDescriptor<Value>` interface.\n * @param descriptor Object of a `DataDescriptor<Value>` interface to guard.\n * @param callback A `ResultCallback` function to handle the result of the check whether or not the `descriptor`\n * is an `object` with the `writable` or `value` property, by default it uses `dataCallback()` function.\n * @throws Throws an error if the `descriptor` is not an `object` of a `DataDescriptor<Value>` interface, which means doesn't\n * contain `writable` or `value` property.\n * @returns The return value is a `boolean` indicating whether the `descriptor` is an `object` with the `writable` or `value` property.\n */\n static guard<Value>(\n descriptor: DataDescriptor<Value>,\n callback: ResultCallback = callbacks['data']\n ): descriptor is DataDescriptor<Value> {\n let result = true;\n Object\n .keys(descriptor)\n .forEach(key => (result === true) && (result = key in {\n 'configurable': true, 'enumerable': true, 'writable': true, 'value': true\n }));\n return callback(result, descriptor);\n }\n\n /**\n * Strictly sets with the last saved descriptor values, and stores privately data descriptor of a `DataDescriptor<Value>`\n * interface. Strictly means, parameter `descriptor` is type guarded and method picks `configurable`, `enumerable`, `writable`, `value`\n * properties from the provided `descriptor` object.\n * @param descriptor An `object` of a `DataDescriptor<Value>` interface, to set with the last saved descriptor.\n * @param callback An optional `ResultCallback` function to handle the result of the check whether or not the `descriptor` is an `object`\n * with the `writable` or `value` property, by default it uses `dataCallback()` function from the static `guard()` method.\n * @throws Throws an error if the `descriptor` is not an `object` of a `DataDescriptor<Value>` interface, which means doesn't\n * contain `writable` or `value` property.\n * @returns The return value is a `DataDescriptors` instance.\n */\n public set(\n descriptor: DataDescriptor<Value>,\n callback?: ResultCallback\n ): this {\n this.#descriptor = {\n ...this.#descriptor,\n ...DataDescriptors.define(descriptor, callback),\n };\n return this;\n }\n}\n","// Class.\nimport { AccessorDescriptors } from './accessor-descriptors.class';\nimport { DataDescriptors } from './data-descriptors.class';\n\n// Interface.\nimport { DataDescriptor } from '../interface';\n\n// Type.\nimport { ThisAccessorDescriptor } from '../type';\nimport { ObjectPropertyDescriptors } from '../type/object-property-descriptors.type';\nimport { ResultCallback } from '../type/result-callback.type';\n\n/**\n *\n */\nexport class Descriptor {\n /**\n * Returns defined accessor descriptor of a `ThisAccessorDescriptor<Value, Obj>` type, on `get` or `set` property detected.\n * @param descriptor An `object` of a `ThisAccessorDescriptor<Value, Obj>` type, to define with the default values of the\n * `CommonDescriptor`.\n * @param callback An optional `ResultCallback` function to handle the result of the check whether or not the `descriptor` is an\n * `object` with `get` or `set` property, by default it uses `accessorCallback()` function from the `guard`.\n * @throws Throws an `Error` if the `descriptor` is not an `object` of a `ThisAccessorDescriptor<Value, Obj>` type,\n * which means it doesn't contain `get` or `set` property.\n * @returns The return value is an `object` of a `ThisAccessorDescriptor<Value, Obj>` type.\n */\n static defineAccessor<Value, Obj extends object>(\n descriptor: ThisAccessorDescriptor<Value, Obj>,\n callback?: ResultCallback\n ): ThisAccessorDescriptor<Value, Obj> {\n return AccessorDescriptors.define(descriptor, callback);\n }\n\n /**\n * Returns defined data descriptor of a `DataDescriptor<Value>` interface, on `writable` or `value` property detected.\n * @param descriptor An `object` of a `DataDescriptor<Value>` interface, to set with the default values of the\n * `CommonDescriptor`.\n * @param callback An optional `ResultCallback` function to handle the result of the check whether or not the `descriptor` is an `object`\n * with the `writable` or `value` property, by default it uses `dataCallback()` function from the static `DataDescriptors.guard()` method.\n * @returns The return value is an `object` of a `DataDescriptor<Value>` interface.\n */\n static defineData<Value>(\n descriptor: DataDescriptor<Value>,\n callback?: ResultCallback\n ): DataDescriptor<Value> {\n return DataDescriptors.define(descriptor, callback);\n }\n\n /**\n *\n * @param object\n * @param name\n * @returns\n * @angularpackage\n */\n public static get<Obj, Name extends keyof Obj>(\n object: Obj,\n name: Name\n ): PropertyDescriptor | undefined {\n return (\n Object.getOwnPropertyDescriptor(object, name) ||\n Object.getOwnPropertyDescriptor(this.#detectObject(object), name)\n );\n }\n\n /**\n *\n * @param object\n * @returns\n * @angularpackage\n */\n public static getAll<Obj extends object | Function>(\n object: Obj\n ): ObjectPropertyDescriptors<Obj> {\n return {\n ...Object.getOwnPropertyDescriptors(object),\n ...Object.getOwnPropertyDescriptors(this.#detectObject(object)),\n };\n }\n\n /**\n *\n * @param object\n * @param names\n * @returns\n * @angularpackage\n */\n public static pick<Obj extends object | Function, Names extends keyof Obj>(\n object: Obj,\n ...names: Names[]\n ): Pick<ObjectPropertyDescriptors<Obj>, Names> {\n // Prepare constant to assign descriptors of picked keys.\n const pickedDescriptors: Pick<\n ObjectPropertyDescriptors<Obj>,\n Names\n > = {} as any;\n\n // Get all descriptors.\n const descriptors = this.getAll(object);\n\n // If descriptors exists then set picked descriptor into the map storage.\n typeof descriptors === 'object' &&\n Object.keys(descriptors)\n .filter(key => names.includes(key as any))\n .forEach(key =>\n Object.assign(pickedDescriptors, {\n [key]: descriptors[key],\n })\n );\n return pickedDescriptors;\n }\n\n /**\n * Returns the `__proto__` or `prototype` of the given `object` depending on the detected type.\n * @param object\n * @returns\n * @angularpackage\n */\n static #detectObject(object: any): object {\n return typeof object === 'object'\n ? (object as any)['__proto__']\n : object.prototype;\n }\n}\n","import { Descriptor } from './descriptor.class';\n/**\n *\n */\nexport class Descriptors<\n Obj extends object | Function,\n Keys extends keyof Obj\n> {\n /**\n *\n * @returns\n * @angularpackage\n */\n public get descriptors(): Map<Keys, PropertyDescriptor> {\n return this.#descriptors;\n }\n\n /**\n *\n */\n #descriptors: Map<Keys, PropertyDescriptor> = new Map();\n\n /**\n *\n * @param obj\n * @param keys\n * @angularpackage\n */\n constructor(obj: Obj, ...keys: Keys[]) {\n Array.isArray(keys) && keys.length > 0\n ? this.setPicked(obj, ...keys)\n : this.setAll(obj);\n }\n\n /**\n *\n * @param key\n * @returns\n * @angularpackage\n */\n public get(key: Keys): PropertyDescriptor | undefined {\n return this.#descriptors.get(key);\n }\n\n /**\n *\n * @param key\n * @returns\n * @angularpackage\n */\n public getAll(): Array<[Keys, PropertyDescriptor]> {\n return Array.from(this.#descriptors.entries());\n }\n\n /**\n *\n * @param key\n * @returns\n * @angularpackage\n */\n public has(key: Keys): boolean {\n return this.#descriptors.has(key);\n }\n\n /**\n *\n * @param key\n * @param value\n * @returns\n * @angularpackage\n */\n public set(key: Keys, value: PropertyDescriptor): this {\n this.#descriptors.set(key, value);\n return this;\n }\n /**\n *\n * @param object\n * @returns\n * @angularpackage\n */\n public setAll<Key extends Keys>(object: Obj): this {\n // Pick all the descriptors of the given `object`.\n const objectDescriptors = Descriptor.getAll(object);\n // If description exists in the object set them into the map storage.\n typeof objectDescriptors === 'object' &&\n Object.keys(objectDescriptors).forEach((key) =>\n this.#descriptors.set(key as Key, objectDescriptors[key as Key])\n );\n return this;\n }\n\n /**\n *\n * @param obj\n * @param keys\n * @returns\n * @angularpackage\n */\n public setPicked<Key extends Keys>(obj: Obj, ...keys: Key[]): this {\n // Pick the descriptors of the given `keys`.\n const pickedDescriptors = Descriptor.pick(obj, ...keys);\n // If description exists in the object set them into the map storage.\n typeof pickedDescriptors === 'object' &&\n Object.keys(pickedDescriptors).forEach((key) =>\n this.#descriptors.set(key as Key, pickedDescriptors[key as Key])\n );\n return this;\n }\n}\n","// Class.\nimport { Descriptors } from '../descriptor/lib/descriptors.class';\n// Type.\nimport { GetterCallback } from '../type/getter-callback.type';\nimport { SetterCallback } from '../type/setter-callback.type';\n/**\n *\n */\nexport class WrapProperty<\n Obj extends object | Function,\n Names extends keyof Obj\n> {\n /**\n *\n */\n public get descriptors(): Descriptors<Obj, Names> {\n return this.#descriptors;\n }\n\n /**\n *\n */\n public get wrapped(): Set<Names> {\n return this.#wrapped;\n }\n\n /**\n *\n */\n public get wrappedValues(): Map<Names, any> {\n return this.#wrappedValues;\n }\n\n /**\n *\n */\n #descriptors: Descriptors<Obj, Names>;\n\n /**\n *\n */\n #object: Obj;\n\n /**\n *\n */\n #wrapped: Set<Names> = new Set();\n\n /**\n *\n */\n #wrappedValues: Map<Names, any> = new Map();\n\n /**\n *\n * @param object\n * @param names\n * @angularpackage\n */\n constructor(object: Obj, ...names: Names[]) {\n this.#object = object;\n this.#descriptors = new Descriptors(object, ...names);\n }\n\n /**\n *\n * @param names\n * @param getterCallback\n * @param setterCallback\n * @returns\n * @angularpackage\n */\n public wrap<Name extends Names>(\n names: Name | Name[],\n getterCallback?: GetterCallback<Obj, Name>,\n setterCallback?: SetterCallback<Obj, Name>\n ): this {\n Array.isArray(names)\n ? names.forEach(name => this.#wrap(this.#object, name, getterCallback, setterCallback))\n : this.#wrap(this.#object, names, getterCallback, setterCallback);\n return this;\n }\n\n /**\n *\n * @param names\n * @returns\n * @angularpackage\n */\n public unwrap(...names: Names[]): this {\n Array.isArray(names) &&\n names.forEach(\n (name) => (\n // Remove from the #wrapped storage.\n this.#wrapped.delete(name),\n Object.defineProperty(this.#object, name, {\n ...this.#descriptors.get(name),\n })\n )\n );\n return this;\n }\n\n /**\n * TODO: Check wrapping for union types.\n * Wrapper for source object property.\n * @param object Source object as decorator function or component type to wrap properties.\n * @param name Source object property key to wrap value.\n * @param getterCallback Function to wrap source property getter.\n * @param setterCallback Function to wrap source property setter.\n * @angularpackage\n */\n #wrap<Name extends Names>(\n object: Obj,\n name: Name,\n getterCallback?: GetterCallback<Obj, Name>,\n setterCallback?: SetterCallback<Obj, Name>\n ): this {\n const thisInstance = this;\n if (this.#wrapped.has(name) === false) {\n if (typeof object === 'object' || typeof object === 'function') {\n // If the descriptor is not already found set the original descriptor if exists.\n this.#descriptors.has(name) === false &&\n this.#descriptors.setPicked(object, name);\n\n // Detect source.\n const detectedSource =\n typeof object === 'function' ? object.prototype : object;\n\n // Sets the default value to wrapped property.\n this.#wrappedValues.set(name, detectedSource[name]);\n\n // Define property.\n Object.defineProperty(detectedSource, name, {\n configurable: true,\n // If true then Maximum call exceeded.\n enumerable: false,\n get(): Obj[Name] {\n // Prepare variable to return.\n let result;\n // Perform stored getter.\n thisInstance.descriptors.has(name) &&\n thisInstance.descriptors\n .get(name)\n ?.get?.apply(this, arguments as any);\n\n // Custom getter.\n typeof getterCallback === 'function' &&\n (result = getterCallback(name, this));\n\n // Returns the value.\n return result || thisInstance.wrappedValues.get(name);\n },\n set(value: Obj[Name]): void {\n // Store the old value to pass to setterCallback.\n const oldValue = thisInstance.wrappedValues.get(name);\n // Perform stored setter.\n thisInstance.descriptors.has(name) &&\n thisInstance.descriptors\n .get(name)\n ?.set?.apply(this, arguments as any);\n // Set the value.\n thisInstance.wrappedValues.set(name, value);\n // Use custom setter.\n typeof setterCallback === 'function' &&\n setterCallback(value, oldValue, name, this);\n },\n });\n this.#wrapped.add(name);\n } else {\n throw new Error(\n `Problem: Argument \\`object\\`: ${object} must be generic type variable \\`Obj\\`.\n Quick fix: Check the passed object in the constructor.\n `\n );\n }\n } else {\n throw new Error(\n `Problem: Property \\`name\\`: ${String(name)} is already wrapped.`\n );\n }\n return this;\n }\n}\n","// Class.\nimport { WrapProperty } from './wrap-property.class';\n\n// Type.\nimport { GetterCallback } from '../type/getter-callback.type';\nimport { SetterCallback } from '../type/setter-callback.type';\n\n// Interface.\nimport { AccessorDescriptor } from '../descriptor/interface/accessor-descriptor.interface';\nimport { DataDescriptor } from '../descriptor/interface/data-descriptor.interface';\n\n/**\n *\n */\nexport class Property<\n Obj extends object,\n Names extends keyof Obj\n> extends WrapProperty<Obj, Names> {\n /**\n *\n * @param object\n * @param name\n * @param accessor\n * @returns\n * @angularpackage\n */\n public static define<Obj extends object, Name extends PropertyKey, Value>(\n object: Obj,\n name: Name,\n data?: DataDescriptor<Value>,\n accessor?: AccessorDescriptor<Value> & ThisType<Obj>\n ): Obj & { [K in Name]: Value } {\n typeof data === 'object'\n ? Object.defineProperty(object, name, data)\n : typeof accessor === 'object' &&\n Object.defineProperty(object, name, accessor);\n return object as any;\n }\n\n /**\n *\n * @param obj\n * @param name\n * @returns\n * @angularpackage\n */\n public static set<Obj extends object, Name extends keyof Obj>(\n object: Obj,\n name: Name,\n value: Obj[Name]\n ): typeof Property {\n object[name] = value;\n return this;\n }\n\n /**\n *\n * @param object\n * @param name\n * @returns\n * @angularpackage\n */\n public static get<Obj extends object, Name extends keyof Obj>(\n object: Obj,\n name: Name\n ): Obj[Name] {\n return object[name];\n }\n\n /**\n *\n * @param object\n * @param names\n * @returns\n * @angularpackage\n */\n public static pick<Obj extends object, Names extends keyof Obj>(\n object: Obj,\n ...names: Names[]\n ): { [Key in Names]: Obj[Key] } {\n return Object.assign(\n {},\n ...names.map(key =>\n typeof object[key] !== 'undefined' ? { [key]: object[key] } : undefined\n )\n );\n }\n\n /**\n *\n * @param object\n * @param names\n * @param getterCallback\n * @param setterCallback\n * @returns\n * @angularpackage\n */\n public static wrap<Obj extends object | Function, Names extends keyof Obj>(\n object: Obj,\n names: Names[],\n getterCallback?: GetterCallback<Obj, Names>,\n setterCallback?: SetterCallback<Obj, Names>\n ): WrapProperty<Obj, Names> {\n return new WrapProperty(object, ...names).wrap(\n names,\n getterCallback,\n setterCallback\n );\n }\n\n /**\n *\n * @param object\n * @param names\n * @angularpackage\n */\n constructor(object: Obj, ...names: Names[]) {\n super(object, ...names);\n }\n}\n"],"names":[],"mappings":";;AAUO,MAAM,aAAa,GAAmB,CAC3C,OAAe,EACf,EAAA,GAAc,KAAK,KACD;AAClB,IAAA,OAAO,CAAC,MAAe,EAAE,KAAU,KAAa;QAC9C,IAAI,MAAM,KAAK,EAAE,EAAE;YACjB,MAAM,IAAI,KAAK,CACb,CAAG,EAAA,OAAO,eACR,OAAO,KAAK,KAAK,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,KACtD,CAAE,CAAA,CACH,CAAC;AACH,SAAA;AACD,QAAA,OAAO,MAAM,CAAC;AAChB,KAAC,CAAC;AACJ,CAAC;;ACjBM,MAAM,SAAS,GAAc;AAClC,IAAA,QAAQ,EAAE,aAAa,CAAC,CAAA,0EAAA,CAA4E,CAAC;AACrG,IAAA,IAAI,EAAE,aAAa,CAAC,CAAA,0DAAA,CAA4D,CAAC;AACjF,IAAA,UAAU,EAAE,aAAa,CAAC,CAAA,oCAAA,C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