Interface: RasdStorage
Defined in: types.ts:114
The slice of StorageAdapter the renderer actually uses (spine §7).
Properties
attachments?
readonly optional attachments?: AttachmentStoreLike;
Defined in: types.ts:136
Absent on a submissions-only host; capture fields then keep blobs in memory.
outbox?
readonly optional outbox?: OutboxLike;
Defined in: types.ts:142
Absent when the host does not sync. When present, finalize() enqueues the
submission so @rasd/sync picks it up on its next pass — structural, so a
real OutboxQueue from @rasd/storage stays assignable.
submissions
readonly submissions: SubmissionStoreLike;
Defined in: types.ts:115
Methods
on()?
optional on(event, handler): () => void;
Defined in: types.ts:134
The change feed, when the adapter has one (StorageAdapter.on in
@rasd/storage). useSubmission subscribes to it so a list refreshes when
autosave commits or sync stamps a status — without it the hook reads once
and shows a stale row until something else re-renders.
The handler parameter is any, and that is deliberate rather than lazy. A
real adapter's on takes a handler over its WHOLE event union (change | error | blocked | quota | migration); this view wants only the change
member. TypeScript compares a handler's own parameter strictly even for a
method, so a narrower annotation here makes every real adapter
un-assignable — which is exactly what happened: createDexieStorage()'s
adapter could not be passed to <RasdProvider storage={…}> in ANY
TypeScript host, this repo's own demo app included, because apps/* sat
outside pnpm typecheck and nothing ever compiled the documented
one-liner. RasdStorageChange is the shape the renderer reads; call sites
annotate with it.
Parameters
| Parameter | Type |
|---|---|
event | "change" |
handler | (e) => void |
Returns
() => void