示例工程 38-schema-migrations-concurrency

38-schema-migrations-concurrency/app/.tsc/shared/ipc.d.ts

typescript · 1.5 KB

import type { MigrationResult, HistoryRow } from "./migrations";
import type { ContentionResult } from "./contention";
export declare const CH: {
    readonly snapshot: "schema:snapshot";
    readonly migrate: "schema:migrate";
    readonly reset: "schema:reset";
    readonly fail: "schema:fail-migration";
    readonly queue: "schema:queue-writes";
    readonly contention: "schema:contention";
    readonly refresh: "schema:refresh";
};
export type EventRow = {
    at: number;
    kind: string;
    detail: string;
};
export type QueueResult = {
    count: number;
    order: number[];
    min: number;
    max: number;
    ms: number;
    at: number;
};
export type FailureInfo = {
    from: number;
    to: number;
    error: string;
    steps: MigrationResult["steps"];
    columns: string[];
    titlePresent: boolean;
    at: number;
};
export type Snapshot = {
    platform: string;
    electronVersion: string;
    nodeVersion: string;
    schema: {
        path: string;
        version: number;
        target: number;
        tables: string[];
        columns: string[];
        counts: {
            notes: number;
            events: number;
            history: number;
        };
        history: HistoryRow[];
    };
    migration: MigrationResult | null;
    failure: FailureInfo | null;
    queue: {
        pending: number;
        last: QueueResult | null;
    };
    contention: ContentionResult | null;
    events: EventRow[];
};
export declare function assertQueueReq(value: unknown): asserts value is {
    count: number;
};
//# sourceMappingURL=ipc.d.ts.map