PriorityInstanceSpec<F>Full priority-queue instance contract for itemSchema F.
models
Source src/WorkPool.ts:17406 lines
export type type PriorityInstanceSpec<F extends Schema.Struct.Fields> = Omit<{
add: Hyperlink.Method<Schema.Tuple<readonly [Schema.Union<readonly [Schema.Struct<F>, Schema.$Array<Schema.Struct<F>>]>, Schema.optional<Schema.Schema<string | number>>]>, Schema.Void, Schema.Never, false, Hyperlink.MethodAnnotations & {
readonly callStyle: "pair";
} & {
description: string;
}, Hyperlink.Derive>;
enqueue: Hyperlink.Method<Schema.$Array<Schema.Struct<{
readonly item: Schema.Struct<F>;
readonly entryId: Schema.String;
readonly key: Schema.optional<Schema.String>;
... 7 more ...;
readonly attributes: Schema.optional<...>;
}>>, ... 4 more ..., Hyperlink.Derive>;
... 14 more ...;
metrics: {
...;
};
}, "add"> & {
...;
}
Full priority-queue instance contract for itemSchema F.
PriorityInstanceSpec<function (type parameter) F in type PriorityInstanceSpec<F extends Schema.Struct.Fields>F extends import SchemaSchema.Struct.type Struct<Fields extends Struct.Fields>.Fields = {
readonly [x: string]: Schema.Constraint;
readonly [x: number]: Schema.Constraint;
readonly [x: symbol]: Schema.Constraint;
}
Constraint for a struct field map: an object whose values are schemas.
Fields> = type Omit<T, K extends keyof any> = {
[P in Exclude<keyof T, K>]: T[P]
}
Construct a type with the properties of T except for those in type K.
Omit<
type ReturnType<
T extends (...args: any) => any
> = T extends (...args: any) => infer R ? R : any
Obtain the return type of a function type
ReturnType<typeof const prioritySpec: <F extends Schema.Struct.Fields>(itemSchema: Schema.Struct<F>, laneConfig: WorkPoolPriorityLaneConfig, wire?: {
readonly success?: Schema.Top;
readonly error?: Schema.Top;
}) => {
add: Hyperlink.Method<Schema.Tuple<readonly [Schema.Union<readonly [Schema.Struct<F>, Schema.$Array<Schema.Struct<F>>]>, Schema.optional<Schema.Schema<string | number>>]>, Schema.Void, Schema.Never, false, Hyperlink.MethodAnnotations & {
readonly callStyle: "pair";
} & {
description: string;
}, Hyperlink.Derive>;
... 15 more ...;
metrics: {
...;
};
}
Build a priority-queue instance spec: shared
priorityControlSpec
plus
per-instance data-plane procedures typed by itemSchema.
prioritySpec<function (type parameter) F in type PriorityInstanceSpec<F extends Schema.Struct.Fields>F>>,
"add"
> & {
readonly add: PriorityAddMethod(property) add: {
kind: MethodKind;
payload: P;
success: Su;
error: E;
stream: Str;
annotations: Ann;
annotate: <A extends MethodAnnotations>(annotations: A) => Method<P, Su, E, Str, Ann & A, Client>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
add: type PriorityAddMethod = Hyperlink.Method<
Schema.Tuple<readonly [Schema.Top, Schema.Top]>,
Schema.Void,
Schema.Never,
false,
PriorityPairAnnotations,
Hyperlink.Derive
>
Wire add member — tuple payload surfaced as add(item, lane?).
PriorityAddMethod;
};
Referenced by 5 symbols