@types/memory-cache
Advanced tools
@@ -22,2 +22,12 @@ // Type definitions for memory-cache 0.2 | ||
| keys(): K[]; | ||
| /** | ||
| * @returns The new size of the cache | ||
| * @see {@link https://github.com/ptarjan/node-cache#importjson--functionjson-string-options--skipduplicates-boolean-} | ||
| */ | ||
| importJson(json: string, options?: { skipDuplicates?: boolean | undefined }): number; | ||
| /** | ||
| * @returns A JSON string representing all the cache data | ||
| */ | ||
| exportJson(): string; | ||
| } | ||
@@ -39,1 +49,11 @@ | ||
| export function keys(): any[]; | ||
| /** | ||
| * @returns The new size of the cache | ||
| * @see {@link https://github.com/ptarjan/node-cache#importjson--functionjson-string-options--skipduplicates-boolean-} | ||
| */ | ||
| export function importJson(json: string, options?: { skipDuplicates?: boolean | undefined }): number; | ||
| /** | ||
| * @returns A JSON string representing all the cache data | ||
| */ | ||
| export function exportJson(): string; |
| MIT License | ||
| Copyright (c) Microsoft Corporation. All rights reserved. | ||
| Copyright (c) Microsoft Corporation. | ||
@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy |
| { | ||
| "name": "@types/memory-cache", | ||
| "version": "0.2.1", | ||
| "version": "0.2.2", | ||
| "description": "TypeScript definitions for memory-cache", | ||
| "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/memory-cache", | ||
| "license": "MIT", | ||
@@ -27,4 +28,4 @@ "contributors": [ | ||
| "dependencies": {}, | ||
| "typesPublisherContentHash": "38c925de2fcb0b4d3844a6ed5e0f1bb3bbda32f4cba4bc064624f0da8f690377", | ||
| "typeScriptVersion": "2.8" | ||
| "typesPublisherContentHash": "5a38131169ec7bd62700910e993be7ae84cead24671fae56df1ed29a2f395d8b", | ||
| "typeScriptVersion": "3.8" | ||
| } |
@@ -9,5 +9,66 @@ # Installation | ||
| Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/memory-cache. | ||
| ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/memory-cache/index.d.ts) | ||
| ````ts | ||
| // Type definitions for memory-cache 0.2 | ||
| // Project: https://github.com/ptarjan/node-cache | ||
| // Definitions by: Jeff Goddard <https://github.com/jedigo> | ||
| // Travis Thieman <https://github.com/thieman> | ||
| // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
| // Originally imported from: https://github.com/soywiz/typescript-node-definitions/memory-cache.d.ts | ||
| export class CacheClass<K, V> { | ||
| put(key: K, value: V, time?: number, timeoutCallback?: (key: K, value: V) => void): V; | ||
| get(key: K): V | null; | ||
| del(key: K): void; | ||
| clear(): void; | ||
| size(): number; | ||
| memsize(): number; | ||
| debug(bool: boolean): void; | ||
| hits(): number; | ||
| misses(): number; | ||
| keys(): K[]; | ||
| /** | ||
| * @returns The new size of the cache | ||
| * @see {@link https://github.com/ptarjan/node-cache#importjson--functionjson-string-options--skipduplicates-boolean-} | ||
| */ | ||
| importJson(json: string, options?: { skipDuplicates?: boolean | undefined }): number; | ||
| /** | ||
| * @returns A JSON string representing all the cache data | ||
| */ | ||
| exportJson(): string; | ||
| } | ||
| export const Cache: typeof CacheClass; | ||
| export function put<V>(key: any, value: V, time?: number, timeoutCallback?: (key: any, value: any) => void): V; | ||
| export function get(key: any): any; | ||
| export function del(key: any): void; | ||
| export function clear(): void; | ||
| export function size(): number; | ||
| export function memsize(): number; | ||
| export function debug(bool: boolean): void; | ||
| export function hits(): number; | ||
| export function misses(): number; | ||
| export function keys(): any[]; | ||
| /** | ||
| * @returns The new size of the cache | ||
| * @see {@link https://github.com/ptarjan/node-cache#importjson--functionjson-string-options--skipduplicates-boolean-} | ||
| */ | ||
| export function importJson(json: string, options?: { skipDuplicates?: boolean | undefined }): number; | ||
| /** | ||
| * @returns A JSON string representing all the cache data | ||
| */ | ||
| export function exportJson(): string; | ||
| ```` | ||
| ### Additional Details | ||
| * Last updated: Mon, 02 Mar 2020 17:35:26 GMT | ||
| * Last updated: Wed, 02 Feb 2022 16:01:26 GMT | ||
| * Dependencies: none | ||
@@ -14,0 +75,0 @@ * Global values: none |
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
6631
75.98%47
62.07%1
-50%78
358.82%