From b235a3dcb8e997a09da04840b73d729335e05af4 Mon Sep 17 00:00:00 2001 From: Vincent Weevers Date: Mon, 23 Dec 2024 19:38:24 +0100 Subject: [PATCH] Fix typings for snapshots Follow-up for 61f15ae. Category: fix --- index.d.ts | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/index.d.ts b/index.d.ts index 353522f..23a978d 100644 --- a/index.d.ts +++ b/index.d.ts @@ -7,17 +7,27 @@ export function supports (...manifests: Array>): IManifest /** - * Describes the abilities of an + * Describes the capabilities of an * [`abstract-level`](https://github.com/Level/abstract-level) database. Support matrices * for known `abstract-level` implementations can be found in * [`level-supports`](https://github.com/Level/supports#features). */ export interface IManifest { /** - * Does the database have snapshot guarantees? Meaning that reads are unaffected by - * simultaneous writes. For example, an iterator should read from a snapshot of the - * database, created at the time `db.iterator()` was called. This means the iterator - * will not see the data of simultaneous write operations. + * Does the database read from a snapshot as described in + * [`abstract-level`](https://github.com/Level/abstract-level#reading-from-snapshots)? + */ + implicitSnapshots: boolean + + /** + * Does the database implement `db.snapshot()` and do read methods accept a `snapshot` + * option as described in + * [`abstract-level`](https://github.com/Level/abstract-level#reading-from-snapshots)? + */ + explicitSnapshots: boolean + + /** + * Alias of {@link implicitSnapshots} for backwards compatibility. */ snapshots: boolean