0.4.7 • Published 6 months ago

@types/dexie-batch v0.4.7

Weekly downloads
118
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/dexie-batch

Summary

This package contains type definitions for dexie-batch (https://github.com/raphinesse/dexie-batch#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/dexie-batch.

index.d.ts

// Type definitions for dexie-batch 0.4
// Project: https://github.com/raphinesse/dexie-batch#readme
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

import { Dexie } from 'dexie';

declare namespace DexieBatch {
    interface Options {
        batchSize: number;
        limit?: number | undefined;
    }
    type Callback<T> = (item: T, index: number) => void;
}

declare class DexieBatch {
    private readonly opts: DexieBatch.Options;

    constructor(opts: DexieBatch.Options);

    isParallel(): boolean;

    each<T>(collection: Dexie.Collection<T>, callback: DexieBatch.Callback<T>): Dexie.Promise<number>;
    eachBatch<T>(collection: Dexie.Collection<T>, callback: DexieBatch.Callback<T[]>): Dexie.Promise<number>;
    eachBatchParallel<T>(collection: Dexie.Collection<T>, callback: DexieBatch.Callback<T[]>): Dexie.Promise<number>;
    eachBatchSerial<T>(collection: Dexie.Collection<T>, callback: DexieBatch.Callback<T[]>, batchIdx?: number): Dexie.Promise<number>;
}

export as namespace DexieBatch;
export = DexieBatch;

Additional Details

  • Last updated: Thu, 08 Jul 2021 09:08:41 GMT
  • Dependencies: @types/dexie
  • Global values: DexieBatch

Credits

These definitions were written by Florian Imdahl.

0.4.5

7 months ago

0.4.4

8 months ago

0.4.7

6 months ago

0.4.6

7 months ago

0.4.3

3 years ago

0.4.2

3 years ago

0.4.1

4 years ago

0.4.0

5 years ago