Skip to content

Interface: OverlapWarning

Defined in: packages/core/src/state-sync/PolicyValidator.ts:140

Warning produced when two policies potentially overlap.

Overlapping policies are not an error (first-match-wins is deterministic), but they can cause subtle configuration bugs when the user expects a more-specific policy to fire but a broader one shadows it.

Example

typescript
const warnings = detectOverlaps(policies);
warnings.forEach(w => console.warn(`[StateSync] ${w.message}`));

Properties

message

ts
readonly message: string;

Defined in: packages/core/src/state-sync/PolicyValidator.ts:142

Human-readable description of the overlap.


shadowedIndex

ts
readonly shadowedIndex: number;

Defined in: packages/core/src/state-sync/PolicyValidator.ts:146

Index of the shadowed (later) policy.


shadowingIndex

ts
readonly shadowingIndex: number;

Defined in: packages/core/src/state-sync/PolicyValidator.ts:144

Index of the shadowing (earlier) policy.