Skip to content

Commit

Permalink
Fix typings for snapshots
Browse files Browse the repository at this point in the history
Follow-up for 61f15ae.

Category: fix
  • Loading branch information
vweevers committed Dec 23, 2024
1 parent 1f1c5b1 commit b235a3d
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,27 @@
export function supports (...manifests: Array<Partial<IManifest>>): 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

Expand Down

0 comments on commit b235a3d

Please sign in to comment.