UNPKG

@ng-doc/ui-kit

Version:

<!-- PROJECT LOGO --> <br /> <div align="center"> <a href="https://github.com/ng-doc/ng-doc"> <img src="https://ng-doc.com/assets/images/ng-doc.svg?raw=true" alt="Logo" height="150px"> </a>

11 lines (10 loc) 619 B
/** * Implements lazy initialization for getter or memoization of a function call similar to pure {@link: Pipe}. * Replaces getter with its calculated value upon first call or keeps track of last call arguments and returned * value for function, skipping calculation when arguments are strictly the same. * * @throws error if used not on getter or function * * CAUTION: `this` is not available inside such functions/getters, they must be pure. */ export declare function ngDocMakePure<T>(_target: Object, propertyKey: string, { get, enumerable, value }: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T>;