fix(core): update
This commit is contained in:
@ -89,7 +89,9 @@ export class SmartDataDbDoc<T, TImplements> {
|
||||
}
|
||||
}
|
||||
|
||||
public static async getInstances<T>(filterArg: Partial<T>): Promise<T[]> {
|
||||
public static async getInstances<T>(
|
||||
filterArg: plugins.tsclass.typeFest.PartialDeep<T>
|
||||
): Promise<T[]> {
|
||||
const self: any = this; // fool typesystem
|
||||
let referenceMongoDBCollection: SmartdataCollection<T>;
|
||||
|
||||
@ -111,7 +113,9 @@ export class SmartDataDbDoc<T, TImplements> {
|
||||
return returnArray;
|
||||
}
|
||||
|
||||
public static async getInstance<T>(filterArg: Partial<T>): Promise<T> {
|
||||
public static async getInstance<T>(
|
||||
filterArg: plugins.tsclass.typeFest.PartialDeep<T>
|
||||
): Promise<T> {
|
||||
const result = await this.getInstances<T>(filterArg);
|
||||
if (result && result.length > 0) {
|
||||
return result[0];
|
||||
|
@ -1,4 +1,9 @@
|
||||
import * as assert from 'assert';
|
||||
// tsclass scope
|
||||
import * as tsclass from '@tsclass/tsclass';
|
||||
|
||||
export { tsclass };
|
||||
|
||||
// @pushrocks scope
|
||||
import * as smartlog from '@pushrocks/smartlog';
|
||||
import * as lodash from 'lodash';
|
||||
import * as mongodb from 'mongodb';
|
||||
@ -6,4 +11,4 @@ import * as smartq from '@pushrocks/smartpromise';
|
||||
import * as smartstring from '@pushrocks/smartstring';
|
||||
import * as smartunique from '@pushrocks/smartunique';
|
||||
|
||||
export { assert, smartlog, lodash, smartq, mongodb, smartstring, smartunique };
|
||||
export { smartlog, lodash, smartq, mongodb, smartstring, smartunique };
|
||||
|
Reference in New Issue
Block a user