UNPKG

@gecogvidanto/plugin-nedb

Version:

Nebd local database management plugin for ĞecoĞvidanto

22 lines (21 loc) 736 B
import Intl from 'intl-ts'; import { Database, ModelList, ModelTypeList } from '@gecogvidanto/plugin'; import { langType } from './locale.en'; import { FullConfig } from './NedbConfig'; import NedbPromiseDatastore from './NedbPromiseDatastore'; declare type DataStores<T> = { [K in keyof T]: NedbPromiseDatastore; }; /** * The nedb database. */ export default class NedbDatabase<T extends ModelList> implements Database<T> { readonly models: T; readonly dbs: DataStores<T>; private readonly binaryStore; private readonly started; constructor(desc: ModelTypeList<T>, nedbConfig: FullConfig['plugins']['nedb'], lang: Intl<langType>); waitForStarted(): Promise<void>; private startDatastore; } export {};