Skip to content

Commit

Permalink
fix: added async deserialize/serialize functions
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarfd committed May 28, 2022
1 parent 9c1cf84 commit 703b98b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ declare namespace Keyv {
/** Namespace for the current instance. */
namespace?: string | undefined
/** A custom serialization function. */
serialize?: ((data: DeserializedData<TValue>) => string) | undefined
serialize?: ((data: DeserializedData<Value>) => string | Promise<string>) | undefined
/** A custom deserialization function. */
deserialize?: ((data: string) => DeserializedData<TValue> | undefined) | undefined
deserialize?: ((data: string) => DeserializedData<Value> | undefined | Promise<DeserializedData<Value> | undefined>) | undefined
/** The storage adapter instance to be used by Keyv. Defaults to in-memory map */
store?: Store<TValue> | Map<string, string>
/** Default TTL. Can be overridden by specififying a TTL on `.set()`. */
Expand Down

0 comments on commit 703b98b

Please sign in to comment.