본문으로 건너뛰기

타입 별칭: CollectionStatus

type CollectionStatus = "idle" | "loading" | "ready" | "error" | "cleaned-up";

정의 위치: packages/db/src/types.ts:577

수명 주기 관리를 위한 컬렉션 상태 값

예제

// Check collection status
if (collection.status === "loading") {
console.log("Collection is loading initial data")
} else if (collection.status === "ready") {
console.log("Collection is ready for use")
}
// Status transitions
// idle → loading → ready (when markReady() is called)
// Any active status can transition to → error or cleaned-up
// error → ready after a successful sync recovery