{"version":3,"sources":["../../src/cfg/data.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAC,GAAG,EAAC,MAAM,aAAa,CAAC;AAEhC;;;;GAIG;AACH,MAAM,WAAW,OAAO,CAAC,KAAK;IAC7B;gCAC4B;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,GAAG,IAAI,KAAK,OAAO,CAAC;IACjD;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;IACV;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB","file":"data.d.ts","sourcesContent":["/**\n *\tMIT License\n *\n *\tCopyright (c) 2019 - 2022 Toreda, Inc.\n *\n *\tPermission is hereby granted, free of charge, to any person obtaining a copy\n *\tof this software and associated documentation files (the \"Software\"), to deal\n *\tin the Software without restriction, including without limitation the rights\n *\tto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n *\tcopies of the Software, and to permit persons to whom the Software is\n *\tfurnished to do so, subject to the following conditions:\n\n * \tThe above copyright notice and this permission notice shall be included in all\n * \tcopies or substantial portions of the Software.\n *\n * \tTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *\tIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *\tFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * \tAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *\tLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n *\tOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * \tSOFTWARE.\n *\n */\n\nimport {Log} from '@toreda/log';\n\n/**\n * Configuration options used during Cache init.\n *\n * @category Cache Config\n */\nexport interface CfgData<ItemT> {\n\t/** Maximum number of items that can be cached. When cache size would exceed this size, older\n\t * items are overwritten. */\n\tcapacityMax?: number;\n\t/**\n\t * Initial size of empty cache. Cache grows automatically as items are added up to `maxSize`.\n\t * Useful in cases where a larger starting cache size is ideal rather than letting it grow,\n\t * such as during init in systems which may rapidly add hundreds of thousands of cache items.\n\t */\n\tinitialSize?: number;\n\t/**\n\t *\tOptional validator invoked each time cache.add is called. Items are added to cache when\n\t * validator returns true, and rejected when it returns false. Allows custom or extended cache\n\t * types to provide custom item validation. When `itemValidator` is not provided, the default\n\t * `itemValidator` is used which rejects only `undefined` and `null` items.\n\t */\n\titemValidator?: (item?: ItemT | null) => boolean;\n\t/**\n\t * Global Log instance to use. Creates a new instance when not provided.\n\t */\n\tlog?: Log;\n\t/**\n\t * Minimum number of seconds allowed prune calls. Prevents costly `prune` calls from occurring\n\t * too frequently.\n\t */\n\tpruneDelay?: number;\n}\n"]}