Skip to content

Interface: QueryDispatchOptions

Defined in: src/wirestate-core/plugin/queries/queries.ts:75

Per-dispatch options for QueryBus.query and QueryBus.queryAsync.

Example

typescript
const flags = queryBus.query<FeatureFlags>("FEATURE_FLAGS", undefined, { optional: true });

Properties

optional?

ts
readonly optional optional?: boolean;

Defined in: src/wirestate-core/plugin/queries/queries.ts:82

Allows a missing handler and returns undefined instead of throwing.

Remarks

Pass a literal true so TypeScript selects the optional overload.