Function createNoArgsCache
- createNoArgsCache<T>(checkProperty, setValue, getValue, deleteValue): {
checkProperty(obj, fn): boolean;
copyValue(dest, source, fn): void;
getValue(obj, fn): any;
invalidate(source, fn): void;
(_target, propertyKey, descriptor): void;
} Parameters
checkProperty: ((obj, propertyKey) => boolean)
- (obj, propertyKey): boolean
Parameters
obj: T
propertyKey: string | symbol
Returns boolean
setValue: ((obj, propertyKey, value) => void)
- (obj, propertyKey, value): void
Parameters
obj: T
propertyKey: string | symbol
value: any
Returns void
getValue: ((obj, propertyKey) => any)
- (obj, propertyKey): any
Parameters
obj: T
propertyKey: string | symbol
Returns any
deleteValue: ((obj, propertyKey) => any)
- (obj, propertyKey): any
Parameters
obj: T
propertyKey: string | symbol
Returns any
Returns {
checkProperty(obj, fn): boolean;
copyValue(dest, source, fn): void;
getValue(obj, fn): any;
invalidate(source, fn): void;
(_target, propertyKey, descriptor): void;
}
- (_target, propertyKey, descriptor): void
Parameters
_target: T
propertyKey: string | symbol
descriptor: PropertyDescriptor
Returns void
checkProperty:function
- checkProperty(obj, fn): boolean
Returns boolean
copyValue:function
- copyValue(dest, source, fn): void
Returns void
getValue:function
- getValue(obj, fn): any
Returns any
invalidate:function
- invalidate(source, fn): void
Returns void
Implementation for caching result of a function that accepts no arguments.