Properties
clearStats
clearStats: ((profileName?) => void)
Type declaration
- (profileName?): void
Parameters
Optional
profileName: string
Returns void
collectStats
collectStats: ((isCollectingStats?) => void)
Type declaration
- (isCollectingStats?): void
Parameters
Optional
isCollectingStats: boolean
Returns void
compose
compose: ((...moizers) => Moizer<Partial<{
isDeepEqual: boolean;
isPromise: boolean;
isReact: boolean;
isSerialized: boolean;
isShallowEqual: boolean;
matchesArg: IsEqual;
matchesKey: IsMatchingKey;
maxAge: number;
maxArgs: number;
maxSize: number;
onCacheAdd: OnCacheOperation<Moizeable>;
onCacheChange: OnCacheOperation<Moizeable>;
onCacheHit: OnCacheOperation<Moizeable>;
onExpire: OnExpire;
profileName: string;
serializer: Serialize;
transformArgs: TransformKey;
updateCacheForKey: UpdateCacheForKey;
updateExpire: boolean;
}>>)
Type declaration
- (...moizers): Moizer<Partial<{
isDeepEqual: boolean;
isPromise: boolean;
isReact: boolean;
isSerialized: boolean;
isShallowEqual: boolean;
matchesArg: IsEqual;
matchesKey: IsMatchingKey;
maxAge: number;
maxArgs: number;
maxSize: number;
onCacheAdd: OnCacheOperation<Moizeable>;
onCacheChange: OnCacheOperation<Moizeable>;
onCacheHit: OnCacheOperation<Moizeable>;
onExpire: OnExpire;
profileName: string;
serializer: Serialize;
transformArgs: TransformKey;
updateCacheForKey: UpdateCacheForKey;
updateExpire: boolean;
}>> Parameters
Rest
...moizers: (Moize<Partial<{
isDeepEqual: boolean;
isPromise: boolean;
isReact: boolean;
isSerialized: boolean;
isShallowEqual: boolean;
matchesArg: IsEqual;
matchesKey: IsMatchingKey;
maxAge: number;
maxArgs: number;
maxSize: number;
onCacheAdd: OnCacheOperation<Moizeable>;
onCacheChange: OnCacheOperation<Moizeable>;
onCacheHit: OnCacheOperation<Moizeable>;
onExpire: OnExpire;
profileName: string;
serializer: Serialize;
transformArgs: TransformKey;
updateCacheForKey: UpdateCacheForKey;
updateExpire: boolean;
}>> | Moizer<Partial<{
isDeepEqual: boolean;
isPromise: boolean;
isReact: boolean;
isSerialized: boolean;
isShallowEqual: boolean;
matchesArg: IsEqual;
matchesKey: IsMatchingKey;
maxAge: number;
maxArgs: number;
maxSize: number;
onCacheAdd: OnCacheOperation<Moizeable>;
onCacheChange: OnCacheOperation<Moizeable>;
onCacheHit: OnCacheOperation<Moizeable>;
onExpire: OnExpire;
profileName: string;
serializer: Serialize;
transformArgs: TransformKey;
updateCacheForKey: UpdateCacheForKey;
updateExpire: boolean;
}>>)[]
Returns Moizer<Partial<{
isDeepEqual: boolean;
isPromise: boolean;
isReact: boolean;
isSerialized: boolean;
isShallowEqual: boolean;
matchesArg: IsEqual;
matchesKey: IsMatchingKey;
maxAge: number;
maxArgs: number;
maxSize: number;
onCacheAdd: OnCacheOperation<Moizeable>;
onCacheChange: OnCacheOperation<Moizeable>;
onCacheHit: OnCacheOperation<Moizeable>;
onExpire: OnExpire;
profileName: string;
serializer: Serialize;
transformArgs: TransformKey;
updateCacheForKey: UpdateCacheForKey;
updateExpire: boolean;
}>>
deep
deep: Moizer<{
isDeepEqual: true;
}>
getStats
getStats: ((profileName?) => StatsObject)
Type declaration
- (profileName?): StatsObject
Parameters
Optional
profileName: string
Returns StatsObject
infinite
infinite: Moizer<Partial<{
isDeepEqual: boolean;
isPromise: boolean;
isReact: boolean;
isSerialized: boolean;
isShallowEqual: boolean;
matchesArg: IsEqual;
matchesKey: IsMatchingKey;
maxAge: number;
maxArgs: number;
maxSize: number;
onCacheAdd: OnCacheOperation<Moizeable>;
onCacheChange: OnCacheOperation<Moizeable>;
onCacheHit: OnCacheOperation<Moizeable>;
onExpire: OnExpire;
profileName: string;
serializer: Serialize;
transformArgs: TransformKey;
updateCacheForKey: UpdateCacheForKey;
updateExpire: boolean;
}>>
isCollectingStats
isCollectingStats: (() => boolean)
Type declaration
- (): boolean
Returns boolean
isMoized
isMoized: ((value) => value is Moized<Moizeable, Partial<{
isDeepEqual: boolean;
isPromise: boolean;
isReact: boolean;
isSerialized: boolean;
isShallowEqual: boolean;
matchesArg: IsEqual;
matchesKey: IsMatchingKey;
maxAge: number;
maxArgs: number;
maxSize: number;
onCacheAdd: OnCacheOperation<Moizeable>;
onCacheChange: OnCacheOperation<Moizeable>;
onCacheHit: OnCacheOperation<Moizeable>;
onExpire: OnExpire;
profileName: string;
serializer: Serialize;
transformArgs: TransformKey;
updateCacheForKey: UpdateCacheForKey;
updateExpire: boolean;
}>>)
Type declaration
- (value): value is Moized<Moizeable, Partial<{
isDeepEqual: boolean;
isPromise: boolean;
isReact: boolean;
isSerialized: boolean;
isShallowEqual: boolean;
matchesArg: IsEqual;
matchesKey: IsMatchingKey;
maxAge: number;
maxArgs: number;
maxSize: number;
onCacheAdd: OnCacheOperation<Moizeable>;
onCacheChange: OnCacheOperation<Moizeable>;
onCacheHit: OnCacheOperation<Moizeable>;
onExpire: OnExpire;
profileName: string;
serializer: Serialize;
transformArgs: TransformKey;
updateCacheForKey: UpdateCacheForKey;
updateExpire: boolean;
}>> Returns value is Moized<Moizeable, Partial<{
isDeepEqual: boolean;
isPromise: boolean;
isReact: boolean;
isSerialized: boolean;
isShallowEqual: boolean;
matchesArg: IsEqual;
matchesKey: IsMatchingKey;
maxAge: number;
maxArgs: number;
maxSize: number;
onCacheAdd: OnCacheOperation<Moizeable>;
onCacheChange: OnCacheOperation<Moizeable>;
onCacheHit: OnCacheOperation<Moizeable>;
onExpire: OnExpire;
profileName: string;
serializer: Serialize;
transformArgs: TransformKey;
updateCacheForKey: UpdateCacheForKey;
updateExpire: boolean;
}>>
matchesArg
matchesArg: (<Matcher>(argMatcher) => Moizer<{ matchesArg: Matcher; }>) matchesKey
matchesKey: (<Matcher>(keyMatcher) => Moizer<{ matchesKey: Matcher; }>) Type declaration
- <Matcher>(keyMatcher): Moizer<{
matchesKey: Matcher;
}> Type Parameters
- Matcher extends IsMatchingKey
Returns Moizer<{
matchesKey: Matcher;
}>
maxAge
maxAge: MaxAge
maxArgs
maxSize
profile
promise
promise: Moizer<{
isPromise: true;
}>
react
react: Moizer<{
isReact: true;
}>
serialize
serialize: Moizer<{
isSerialized: true;
}>
serializeWith
serializeWith: (<Serializer>(serializer) => Moizer<{ isSerialized: true; serializer: Serializer; }>) Type declaration
- <Serializer>(serializer): Moizer<{
isSerialized: true;
serializer: Serializer;
}> Type Parameters
- Serializer extends Serialize
Returns Moizer<{
isSerialized: true;
serializer: Serializer;
}>
shallow
shallow: Moizer<{
isShallowEqual: true;
}>
transformArgs
updateCacheForKey
Type declaration
- <UpdateWhen>(updateCacheForKey): Moizer<{
updateCacheForKey: UpdateWhen;
}> Type Parameters
- UpdateWhen extends UpdateCacheForKey
Returns Moizer<{
updateCacheForKey: UpdateWhen;
}>