@types/keyv
Advanced tools
Comparing version 3.1.2 to 3.1.3
@@ -25,3 +25,6 @@ // Type definitions for keyv 3.1 | ||
/** Returns the value. */ | ||
get(key: string): Promise<TValue | undefined>; | ||
get<TRaw extends boolean = false>(key: string, options?: { raw?: TRaw }): | ||
Promise<(TRaw extends false | ||
? TValue | ||
: Keyv.DeserializedData<TValue>) | undefined>; | ||
/** | ||
@@ -48,5 +51,5 @@ * Set a value. | ||
/** A custom serialization function. */ | ||
serialize?: ((data: TValue) => string) | undefined; | ||
serialize?: ((data: DeserializedData<TValue>) => string) | undefined; | ||
/** A custom deserialization function. */ | ||
deserialize?: ((data: string) => TValue) | undefined; | ||
deserialize?: ((data: string) => DeserializedData<TValue> | undefined) | undefined; | ||
/** The connection string URI. */ | ||
@@ -64,2 +67,6 @@ uri?: string | undefined; | ||
interface DeserializedData<TValue> { | ||
value: TValue; expires: number | null; | ||
} | ||
interface Store<TValue> { | ||
@@ -66,0 +73,0 @@ get(key: string): TValue | Promise<TValue | undefined> | undefined; |
{ | ||
"name": "@types/keyv", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"description": "TypeScript definitions for keyv", | ||
@@ -30,4 +30,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/keyv", | ||
}, | ||
"typesPublisherContentHash": "2b153ef5b8e08f978aea261701c155564f0e696b711bf90a0914388f9598aa95", | ||
"typeScriptVersion": "3.6" | ||
"typesPublisherContentHash": "f8d3aab62b87448dca0f22f85932aed615f961053f7cc2604aad6c374e62c692", | ||
"typeScriptVersion": "3.7" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Tue, 06 Jul 2021 22:02:36 GMT | ||
* Last updated: Tue, 07 Sep 2021 09:31:23 GMT | ||
* Dependencies: [@types/node](https://npmjs.com/package/@types/node) | ||
@@ -14,0 +14,0 @@ * Global values: none |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5583
69