Welshman Docs / @welshman/app / Thunks
Class: Thunks
Defined in: app/src/plugins/thunk.ts:355
Per-app thunk manager — the publish-side counterpart of Network. Owns the app's optimistic-publish history store and the queue that paces publishing. Reach it via app.use(Thunks); publish fills in the app (the acting user is derived from it), enqueues the thunk (optimistically writing it to the repository), and returns it.
Constructors
Constructor
new Thunks(
app):Thunks
Defined in: app/src/plugins/thunk.ts:366
Parameters
app
Returns
Thunks
Properties
app
readonlyapp:IApp
Defined in: app/src/plugins/thunk.ts:366
history
history:
Writable<Thunk[]>
Defined in: app/src/plugins/thunk.ts:356
queue
Defined in: app/src/plugins/thunk.ts:358
Methods
enqueue()
enqueue(
thunk):void
Defined in: app/src/plugins/thunk.ts:381
Parameters
thunk
Returns
void
flatten()
flatten(
thunks):Iterable<Thunk>
Defined in: app/src/plugins/thunk.ts:420
Parameters
thunks
Returns
Iterable<Thunk>
merge()
merge(
thunks):MergedThunk
Defined in: app/src/plugins/thunk.ts:416
Parameters
thunks
Returns
publish()
publish(
options):Thunk
Defined in: app/src/plugins/thunk.ts:403
Parameters
options
Omit<ThunkOptions, "app">
Returns
retry()
retry(
thunk):Thunk|MergedThunk
Defined in: app/src/plugins/thunk.ts:411