Comparing version 0.3.2 to 0.3.3
@@ -12,13 +12,13 @@ export interface Data<V> { | ||
}; | ||
export declare class Field<T> { | ||
export declare class Field<T, D extends T | void = T | void> { | ||
protected kv: KeyvFile; | ||
protected key: string; | ||
protected defaults?: T | undefined; | ||
constructor(kv: KeyvFile, key: string, defaults?: T | undefined); | ||
get(): T | void; | ||
get(def: T): T; | ||
protected defaults?: D | undefined; | ||
constructor(kv: KeyvFile, key: string, defaults?: D | undefined); | ||
get(): D; | ||
get(def: D): D; | ||
set(val: T, ttl?: number): Promise<any>; | ||
delete(): boolean; | ||
} | ||
export declare function makeField<T = any>(kv: KeyvFile, key: string, defaults?: T): Field<T>; | ||
export declare function makeField<T = any, D extends T | void = T | void>(kv: KeyvFile, key: string, defaults?: D): Field<T, D>; | ||
export declare class KeyvFile<V = any> { | ||
@@ -25,0 +25,0 @@ ttlSupport: boolean; |
{ | ||
"name": "keyv-file", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"description": "File storage adapter for Keyv, using msgpack to serialize data fast and small.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
10474