import { Construct } from 'phecda-core';
import { M as Meta, E as Emitter } from './meta-ZbvaS7xK.js';

declare abstract class Generator {
    private _path;
    constructor(path?: string);
    ext: string;
    abstract name: string;
    get path(): string;
    abstract generateCode(meta: Meta[]): string;
    output(meta: Meta[]): Promise<void>;
}

declare const emitter: Emitter;
interface Options {
    parseModule?: (module: any) => any;
    parseMeta?: (meta: Meta) => Meta | null | undefined;
    generators?: Generator[];
    namespace?: string;
}
declare function defaultServerInject(): void;
declare const phecdaNamespace: Map<string, ServerPhecda>;
declare class ServerPhecda {
    moduleMap: Map<PropertyKey, any>;
    meta: Meta[];
    modelMap: WeakMap<any, Construct>;
    modelSet: WeakSet<Construct>;
    dependenceGraph: Map<PropertyKey, Set<PropertyKey>>;
    parseModule: (module: any) => any;
    parseMeta: (meta: Meta) => Meta | null | undefined;
    generators: Generator[];
    constructor(options: Options);
    start(models: Construct[]): Promise<void>;
    generateCode: () => Promise<void[]>;
    hmr(): void;
    destroy(): Promise<void>;
    createProxyModule(tag: PropertyKey): {};
    protected buildDepModule(Model: Construct): Promise<{
        module: any;
        tag: PropertyKey;
    }>;
    replace(oldModels: Construct[], newModels: Construct[]): Promise<void>;
    has(modelOrTag: Construct | PropertyKey): boolean;
    get<Model extends Construct>(modelOrTag: Model | PropertyKey): InstanceType<Model>;
    getModel(tag: PropertyKey): Construct | undefined;
}
declare function Factory(models: Construct[], opts?: Options): Promise<ServerPhecda>;
declare function useS<Model extends Construct>(model: Model, namespace?: string): InstanceType<Model>;
declare function useS(namespace?: string): ServerPhecda;

export { Factory as F, Generator as G, type Options as O, ServerPhecda as S, defaultServerInject as d, emitter as e, phecdaNamespace as p, useS as u };
