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
- Last updated: Tue, 07 Nov 2023 15:11:36 GMT
- Dependencies: @types/pouchdb-core
Credits
These definitions were written by Lucas Rainett.