Getting Started
Writing content
API Documentation
Customization
Recipes
API References Develop
@ng-doc/ui-kit / Function

ngDocMakePure

Generic types:T

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.

Presentation

function ngDocMakePure(
  _target: Object,
  propertyKey: string,
  { get, enumerable, value }: TypedPropertyDescriptor<T>,
): TypedPropertyDescriptor<T>;

Returns

TypedPropertyDescriptor<T>

Parameters

NameTypeDescription
_target
Object
propertyKey
string
{ get, enumerable, value }
TypedPropertyDescriptor<T>