fix(core): update

This commit is contained in:
Philipp Kunz 2021-06-09 14:10:08 +02:00
parent 8308d8d03b
commit 8e51b518b1
2 changed files with 4 additions and 3 deletions

View File

@ -41,7 +41,7 @@ export function Collection(dbArg: SmartdataDb | TDelayed<SmartdataDb>) {
};
}
interface IManager {
export interface IManager {
db: SmartdataDb
}

View File

@ -3,7 +3,7 @@ import * as plugins from './smartdata.plugins';
import { ObjectMap } from '@pushrocks/lik';
import { SmartdataDb } from './smartdata.classes.db';
import { SmartdataCollection } from './smartdata.classes.collection';
import { IManager, SmartdataCollection } from './smartdata.classes.collection';
export type TDocCreation = 'db' | 'new' | 'mixed';
@ -41,12 +41,13 @@ export function unI() {
};
}
export class SmartDataDbDoc<T extends TImplements, TImplements> {
export class SmartDataDbDoc<T extends TImplements, TImplements, TManager extends IManager = any> {
/**
* the collection object an Doc belongs to
*/
public static collection: SmartdataCollection<any>;
public collection: SmartdataCollection<any>;
public manager: TManager;
/**
* how the Doc in memory was created, may prove useful later.