1.0.6 • Published 6 months ago
@types/transform-pouch v1.0.6
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
// Type definitions for transform-pouch 1.0
// Project: https://github.com/pouchdb-community/transform-pouch
// Definitions by: Lucas Rainett <https://github.com/lucasrainett>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <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;
}
}
// tslint:disable-next-line:no-declare-current-package no-single-declare-module
declare module 'transform-pouch' {
const plugin: PouchDB.Plugin & {transform: () => void, filter: () => void};
export = plugin;
}
Additional Details
- Last updated: Wed, 30 Mar 2022 18:01:47 GMT
- Dependencies: @types/pouchdb-core
- Global values: none
Credits
These definitions were written by Lucas Rainett.