Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/pouchdb-replication

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/pouchdb-replication - npm Package Compare versions

Comparing version 6.1.1 to 6.1.2

57

pouchdb-replication/index.d.ts

@@ -1,12 +0,14 @@

// Type definitions for pouchdb-replication v6.1.2
// Type definitions for pouchdb-replication 6.1
// Project: https://pouchdb.com/
// Definitions by: Jakub Navratil <https://github.com/trubit>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
/// <reference types="pouchdb-core" />
// TODO: Fixing this lint error will require a large refactor
/* tslint:disable:no-single-declare-module */
declare namespace PouchDB {
namespace Replication {
interface ReplicateOptions {

@@ -28,3 +30,3 @@ /** If true, starts subscribing to future changes in the source database and continue replicating them. */

*/
filter?: string | {(doc: any, params: any): any};
filter?: string | ((doc: any, params: any) => any);

@@ -80,12 +82,10 @@ /** Only show changes for docs with these ids (array of strings). */

*/
back_off_function?: (delay: number) => number;
back_off_function?(delay: number): number;
}
interface ReplicationEventEmitter<Content extends Core.Encodable, C, F> extends EventEmitter {
interface ReplicationEventEmitter<Content extends {}, C, F> extends NodeJS.EventEmitter {
on(event: 'change', listener: (info: C) => any): this;
on(event: 'paused', listener: (err: {}) => any): this;
on(event: 'paused' | 'denied' | 'error', listener: (err: {}) => any): this;
on(event: 'active', listener: () => any): this;
on(event: 'denied', listener: (err: {}) => any): this;
on(event: 'complete', listener: (info: F) => any): this;
on(event: 'error', listener: (err: {}) => any): this;

@@ -95,20 +95,19 @@ cancel(): void;

interface Replication<Content extends Core.Encodable>
interface Replication<Content extends {}>
extends ReplicationEventEmitter<Content, ReplicationResult<Content>, ReplicationResultComplete<Content>>,
Promise<ReplicationResultComplete<Content>> {
}
interface ReplicationResult<Content extends Core.Encodable> {
interface ReplicationResult<Content extends {}> {
doc_write_failures: number;
docs_read: number;
docs_written: number;
last_seq: number,
start_time: Date,
ok: boolean,
last_seq: number;
start_time: Date;
ok: boolean;
errors: any[];
docs: Core.ExistingDocument<Content>[];
docs: Array<Core.ExistingDocument<Content>>;
}
interface ReplicationResultComplete<Content extends Core.Encodable> extends ReplicationResult<Content> {
interface ReplicationResultComplete<Content extends {}> extends ReplicationResult<Content> {
end_time: Date;

@@ -123,9 +122,8 @@ status: string;

interface Sync<Content extends Core.Encodable>
interface Sync<Content extends {}>
extends ReplicationEventEmitter<Content, SyncResult<Content>, SyncResultComplete<Content>>,
Promise<SyncResultComplete<Content>> {
}
interface SyncResult<Content extends Core.Encodable> {
interface SyncResult<Content extends {}> {
direction: 'push' | 'pull';

@@ -135,11 +133,9 @@ change: ReplicationResult<Content>;

interface SyncResultComplete<Content extends Core.Encodable> {
interface SyncResultComplete<Content extends {}> {
push?: ReplicationResultComplete<Content>;
pull?: ReplicationResultComplete<Content>;
}
}
interface Static {
/**

@@ -155,3 +151,3 @@ * Replicate data from source to target. Both the source and target can be a PouchDB instance or a string

options?: Replication.ReplicateOptions,
callback?: Core.Callback<any, Replication.ReplicationResultComplete<Content>>
callback?: Core.Callback<Replication.ReplicationResultComplete<Content>>
): Replication.Replication<Content>;

@@ -172,9 +168,7 @@

options?: Replication.SyncOptions,
callback?: Core.Callback<any, Replication.SyncResultComplete<Content>>
callback?: Core.Callback<Replication.SyncResultComplete<Content>>
): Replication.Sync<Content>;
}
interface Database<Content extends Core.Encodable> {
interface Database<Content extends {} = {}> {
replicate: {

@@ -190,3 +184,3 @@ /**

options?: Replication.ReplicateOptions,
callback?: Core.Callback<any, Replication.ReplicationResultComplete<Content>>
callback?: Core.Callback<Replication.ReplicationResultComplete<Content>>
): Replication.Replication<Content>;

@@ -203,3 +197,3 @@

options?: Replication.ReplicateOptions,
callback?: Core.Callback<any, Replication.ReplicationResultComplete<Content>>
callback?: Core.Callback<Replication.ReplicationResultComplete<Content>>
): Replication.Replication<Content>;

@@ -220,5 +214,4 @@ };

options?: Replication.SyncOptions,
callback?: Core.Callback<any, Replication.SyncResultComplete<Content>>
callback?: Core.Callback<Replication.SyncResultComplete<Content>>
): Replication.Sync<Content>;
}

@@ -225,0 +218,0 @@ }

{
"name": "@types/pouchdb-replication",
"version": "6.1.1",
"version": "6.1.2",
"description": "TypeScript definitions for pouchdb-replication",

@@ -22,4 +22,4 @@ "license": "MIT",

"peerDependencies": {},
"typesPublisherContentHash": "7349a15140aa610e66ce67ad5793510b98dde55aad4f90b326017beb1b947c79",
"typeScriptVersion": "2.0"
"typesPublisherContentHash": "2646ee98a975d700e64ba4d24c89deab4dc7338b826bb2657f2be0800ca2eb4f",
"typeScriptVersion": "2.3"
}

@@ -11,3 +11,3 @@ # Installation

Additional Details
* Last updated: Thu, 18 May 2017 23:36:00 GMT
* Last updated: Thu, 15 Jun 2017 20:15:09 GMT
* Dependencies: pouchdb-core

@@ -14,0 +14,0 @@ * Global values: none

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc