示例工程 38-schema-migrations-concurrency
38-schema-migrations-concurrency/app/.tsc/shared/ipc.js
export const CH = {
snapshot: "schema:snapshot",
migrate: "schema:migrate",
reset: "schema:reset",
fail: "schema:fail-migration",
queue: "schema:queue-writes",
contention: "schema:contention",
refresh: "schema:refresh",
};
export function assertQueueReq(value) {
if (typeof value !== "object" || value === null) {
throw new Error("BAD_QUEUE_REQ");
}
const count = value.count;
if (typeof count !== "number" ||
!Number.isInteger(count) ||
count < 1 ||
count > 50) {
throw new Error("BAD_QUEUE_COUNT");
}
}
//# sourceMappingURL=ipc.js.map