UNPKG

@bitbybit-dev/jscad-worker

Version:

Bit By Bit Developers JSCAD Based CAD Library to Program Geometry Via WebWorker

21 lines (20 loc) 873 B
export declare class CacheHelper { hashesFromPreviousRun: {}; usedHashes: {}; argCache: {}; constructor(); cleanAllCache(): void; cacheOp(args: any, cacheMiss: any): any; /** Returns the cached object if it exists, or null otherwise. */ checkCache(hash: any): any; /** Adds this `shape` to the cache, indexable by `hash`. */ addToCache(hash: any, shape: any): any; /** This function computes a 32-bit integer hash given a set of `arguments`. * If `raw` is true, the raw set of sanitized arguments will be returned instead. */ computeHash(args: any, raw?: any): any; /** This function converts a string to a 32bit integer. */ stringToHash(str: string): any; /** This function returns a version of the `inputArray` without the `objectToRemove`. */ remove(inputArray: any, objectToRemove: any): any; }