0.4.7 • Published 6 months ago
@types/dexie-batch v0.4.7
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.