Type Alias: Rule<TDomain *extends* `string` = `string`>
type Rule<TDomain extends string = string> = Omit<InferredRule, "domain"> & {
domain: TDomain;
};Defined in: shared/rules/types/rules.ts:43
A rule row, with domain optionally narrowed by a consumer-supplied
string literal union. Defaults to string so existing call sites keep
their current typing; consumers opt into narrowing via Rule<MyDomain>
(e.g. Rule<"pricing" | "eligibility">) for compile-time safety on
the domain field. Runtime validation via the Rule Zod schema
remains unchanged — it still accepts any string.
Type Declaration
domain
domain: TDomain;Type Parameters
| Type Parameter | Default type |
|---|---|
TDomain extends string | string |