@typeheim/orm-on-fire
Version:
Firestore ORM
20 lines (19 loc) • 872 B
TypeScript
import { EntityManager } from '../Persistence/EntityManager';
import { ReactivePromise } from '@typeheim/fire-rx';
import { DocReference } from '../Persistence/DocReference';
import { Model } from '../Contracts';
import { EntityPromise } from '../Data/EntityPromise';
import { EntityStream } from '../Data/EntityStream';
export declare class Reference<Entity> {
protected entityConstructor: any;
protected owner: Model;
protected _entityBuilder: EntityManager<Entity>;
protected docRef: DocReference;
constructor(entityConstructor: any, owner: Model);
link(reference: Entity | Model): ReactivePromise<void>;
get(): EntityPromise<Entity>;
stream(): EntityStream<Entity>;
protected get entityBuilder(): EntityManager<Entity>;
___attachDockRef(docRef: DocReference): void;
get ___docReference(): DocReference;
}