Welshman Docs / @welshman/app / Thunks
Class: Thunks
Defined in: app/src/plugins/thunk.ts:350
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:361
Parameters
app
Returns
Thunks
Properties
app
readonlyapp:IApp
Defined in: app/src/plugins/thunk.ts:361
history
history:
Writable<Thunk[]>
Defined in: app/src/plugins/thunk.ts:351
queue
Defined in: app/src/plugins/thunk.ts:353
Methods
enqueue()
enqueue(
thunk):void
Defined in: app/src/plugins/thunk.ts:376
Parameters
thunk
Returns
void
flatten()
flatten(
thunks):Iterable<Thunk>
Defined in: app/src/plugins/thunk.ts:415
Parameters
thunks
Returns
Iterable<Thunk>
merge()
merge(
thunks):MergedThunk
Defined in: app/src/plugins/thunk.ts:411
Parameters
thunks
Returns
publish()
publish(
options):Thunk
Defined in: app/src/plugins/thunk.ts:398
Parameters
options
Omit<ThunkOptions, "app">
Returns
retry()
retry(
thunk):Thunk|MergedThunk
Defined in: app/src/plugins/thunk.ts:406