# @types/pouchdb-live-find

> TypeScript definitions for pouchdb-live-find

Latest version **0.4.4** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/pouchdb-live-find
pnpm add @types/pouchdb-live-find
yarn add @types/pouchdb-live-find
bun add @types/pouchdb-live-find
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.4.4 |
| Published | 2023-11-07 |
| First published | 2019-04-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51438 |
| Maintainers | types |

## Links

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

## Dependencies (1)

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

## Recent versions

- 0.4.4 (latest) — 2023-11-07
- 0.4.1 (ts4.0) — 2021-07-08
- 0.4.0 (ts3.0) — 2019-04-29
- 0.4.3 — 2023-10-18
- 0.4.2 — 2023-09-24

## README

# Installation
> `npm install --save @types/pouchdb-live-find`

# Summary
This package contains type definitions for pouchdb-live-find (https://github.com/colinskow/pouchdb-live-find).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pouchdb-live-find.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pouchdb-live-find/index.d.ts)
````ts
/// <reference types="pouchdb-core" />
declare namespace PouchDB {
    namespace LiveFind {
        interface RequestDef<Content extends {}>
            extends Pick<Find.FindRequest<Content>, Exclude<keyof Find.FindRequest<Content>, "use_index">>
        {
            aggregate?: boolean | undefined; // if true outputs an aggregate list on every update event
        }

        interface PaginateOptions<Content extends {}>
            extends Pick<Find.FindRequest<Content>, "sort" | "skip" | "limit">
        {}

        interface UpdateEvent {
            action: "REMOVE" | "ADD" | "UPDATE";
            id: any;
            rev: any;
            doc: any;
        }
        interface LiveFeed<Content extends {} = {}> {
            on(event: "ready" | "cancelled", listener: () => void): this;
            on(event: "error", listener: (err: any) => void): this;
            on(event: "update", listener: (event: UpdateEvent, list: any) => void): this;
        }

        interface LiveFeed<Content extends {} = {}> extends EventEmitter {
            // stops the query and removes all listeners
            cancel(): void;
            // a convenience function to sort any list in place by the sort order you provided. (This will mutate the Array.)
            sort(list: []): [];
            // updates the pagination and sorting of the aggregate list and immediately returns the updated list. Available options are sort, skip, and limit.
            paginate(options: PaginateOptions<Content>): [];
            then(callbackSuccess: () => any): void;
            catch(callbackFailure: () => any): void;
        }
    }
    interface Database<Content extends {} = {}> {
        liveFind(requestDef: LiveFind.RequestDef<Content>): LiveFind.LiveFeed<Content>;
    }
}

declare module "pouchdb-live-find" {
    const plugin: PouchDB.Plugin;
    export = plugin;
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: [@types/pouchdb-core](https://npmjs.com/package/@types/pouchdb-core)

# Credits
These definitions were written by [assemblethis](https://github.com/assemblethis).

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