@types/keyv
Advanced tools
Comparing version 3.1.3 to 3.1.4
@@ -11,7 +11,20 @@ // Type definitions for keyv 3.1 | ||
declare class Keyv<TValue = any> extends EventEmitter { | ||
type WithRequiredProperties<T, K extends keyof T> = T & Required<Pick<T, K>>; | ||
declare class Keyv<TValue = any, TOpts extends { [key: string]: any } = {}> extends EventEmitter { | ||
/** | ||
* `this.opts` is an object containing at least the properties listed | ||
* below. However, `Keyv.Options` allows arbitrary properties as well. | ||
* These properties can be specified as the second type parameter to `Keyv`. | ||
*/ | ||
opts: WithRequiredProperties< | ||
Keyv.Options<TValue>, | ||
'deserialize' | 'namespace' | 'serialize' | 'store' | 'uri' | ||
> & | ||
TOpts; | ||
/** | ||
* @param opts The options object is also passed through to the storage adapter. Check your storage adapter docs for any extra options. | ||
*/ | ||
constructor(opts?: Keyv.Options<TValue>); | ||
constructor(opts?: Keyv.Options<TValue> & TOpts); | ||
/** | ||
@@ -23,3 +36,3 @@ * @param uri The connection string URI. | ||
*/ | ||
constructor(uri?: string, opts?: Keyv.Options<TValue>); | ||
constructor(uri?: string, opts?: Keyv.Options<TValue> & TOpts); | ||
@@ -26,0 +39,0 @@ /** Returns the value. */ |
{ | ||
"name": "@types/keyv", | ||
"version": "3.1.3", | ||
"version": "3.1.4", | ||
"description": "TypeScript definitions for keyv", | ||
@@ -30,4 +30,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/keyv", | ||
}, | ||
"typesPublisherContentHash": "f8d3aab62b87448dca0f22f85932aed615f961053f7cc2604aad6c374e62c692", | ||
"typeScriptVersion": "3.7" | ||
"typesPublisherContentHash": "e83393e0860475d12e960cede22532e18e129cf659f31f2a0298a88cb5d02d36", | ||
"typeScriptVersion": "3.9" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Tue, 07 Sep 2021 09:31:23 GMT | ||
* Last updated: Thu, 17 Mar 2022 05:31:42 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
6123
80