UNPKG

deleight

Version:

A library with 9 modules for writing more expressive web applications with traditional HTML, CSS and JavaScript.

30 lines (29 loc) 725 B
/** * Contains functions for caching function results. Pending tests. * Please report bugs. * * @module */ import { ICallable } from "../../types"; /** * Caches the return value of calling a function. Repeat calls * will simply return the cached value. * * Pending tests. Please report bugs. * * @example * */ export declare function cache<T extends ICallable>(func: T): T; declare function identityHash(object: any): any; /** * Caches the return value of calling a function. using the arguments as keys. * This is also called memoization. * * Pending tests. Please report bugs. * * @example * */ export declare function cacheWith<T extends ICallable>(func: T, hash?: typeof identityHash): T; export {};