@types/transform-pouch
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

Installation

npm install --save @types/transform-pouch

Summary

This package contains type definitions for transform-pouch (https://github.com/pouchdb-community/transform-pouch).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/transform-pouch.

index.d.ts

/// <reference types="pouchdb-core" />

declare namespace PouchDB {
    interface Database<Content extends {} = {}> {
        transform<NewContent extends {}>(config: {
            incoming?(doc: Core.Document<Content>): Core.Document<NewContent> | Promise<Core.Document<NewContent>>;
            outgoing?(doc: Core.Document<NewContent>): Core.Document<Content> | Promise<Core.Document<Content>>;
        }): void;
        // api.filter provided for backwards compat with the old "filter-pouch"
        filter<NewContent extends {}>(config: {
            incoming?(doc: Core.Document<Content>): Core.Document<NewContent> | Promise<Core.Document<NewContent>>;
            outgoing?(doc: Core.Document<NewContent>): Core.Document<Content> | Promise<Core.Document<Content>>;
        }): void;
    }
}

// eslint-disable-next-line @definitelytyped/no-declare-current-package
declare module "transform-pouch" {
    const plugin: PouchDB.Plugin & { transform: () => void; filter: () => void };
    export = plugin;
}

Additional Details

Credits

These definitions were written by Lucas Rainett.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/transform-pouch

Weekly Downloads

120

Version

1.0.6

License

MIT

Unpacked Size

4.74 kB

Total Files

5

Last publish

Collaborators

  • types