# @types/pouchdb-adapter-indexeddb

> TypeScript definitions for pouchdb-adapter-indexeddb

Latest version **9.0.0** (published 2024-11-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/pouchdb-adapter-indexeddb
pnpm add @types/pouchdb-adapter-indexeddb
yarn add @types/pouchdb-adapter-indexeddb
bun add @types/pouchdb-adapter-indexeddb
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 9.0.0 |
| Published | 2024-11-05 |
| First published | 2024-11-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51394 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/pouchdb-adapter-indexeddb
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pouchdb-adapter-indexeddb
- npm.io page: https://npm.io/package/@types/pouchdb-adapter-indexeddb

## Dependencies (1)

- [@types/pouchdb-core](https://npm.io/package/@types/pouchdb-core.md) *

## Recent versions

- 9.0.0 (latest) — 2024-11-05

## README

# Installation
> `npm install --save @types/pouchdb-adapter-indexeddb`

# Summary
This package contains type definitions for pouchdb-adapter-indexeddb (https://pouchdb.com/).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pouchdb-adapter-indexeddb.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pouchdb-adapter-indexeddb/index.d.ts)
````ts
/// <reference types="pouchdb-core" />

declare global {
    namespace PouchDB {
        namespace IndexedDBAdapter {
            interface IndexedDBAdapterConfiguration extends PouchDB.Configuration.LocalDatabaseConfiguration {
                adapter: "indexeddb";
            }
        }

        namespace Core {
            interface PurgeResult {
                ok: boolean;
                deletedRevs: string[];
                documentWasRemovedCompletely: boolean;
            }
        }

        interface Database<Content extends {} = {}> {
            /**
             * Purges the specified document's revision from the database, removing the revision and its history from storage.
             * This operation permanently deletes the revision data, unlike a typical deletion that keeps the revision
             * metadata. Use with caution, as purged revisions cannot be restored and are fully erased.
             *
             * Purge only affects the targeted revision's branch of the revision tree, ensuring that other branches
             * and non-ancestor revisions remain unaffected. If purging results in an empty revision tree,
             * the entire document is deleted.
             *
             * @param docId - The ID of the document to purge.
             * @param rev - The leaf revision ID to purge from the revision tree.
             * @returns A promise that resolves with the purge result, containing:
             * - `ok` (boolean): Indicates the purge operation's success.
             * - `deletedRevs` (string[]): An array of revision IDs that were purged from the document.
             * - `documentWasRemovedCompletely` (boolean): Whether the entire document was removed due to an empty revision tree.
             *
             * @throws {Error} If the specified revision does not exist or is not a leaf.
             */
            purge(docId: string, rev: string): Promise<Core.PurgeResult>;
        }

        interface Static {
            new<Content extends {}>(
                name: string | null,
                options: IndexedDBAdapter.IndexedDBAdapterConfiguration,
            ): Database<Content>;
        }
    }
}

declare function plugin(PouchDB: PouchDB.Static): void;
export = plugin;

````

### Additional Details
 * Last updated: Tue, 05 Nov 2024 19:32:22 GMT
 * Dependencies: [@types/pouchdb-core](https://npmjs.com/package/@types/pouchdb-core)

# Credits
These definitions were written by [Christian Strickland](https://github.com/cstrickland-WE).

---
_Source: https://npm.io/package/@types/pouchdb-adapter-indexeddb · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
