Memex Admin
Dashboard
API Keys
Policies
Mem-Client: as const Arrays Need Companion Union Type
Repository: mem-labs/mem
Back to Policies
Cancel
active
Updated Feb 19, 2026, 8:26 PM
Name
Status
active
inactive
Markdown
Exported `as const` arrays require companion union type exports. Rationale: - Companion union types preserve type safety and prevent duplicated literal unions. Scope: - PR review policy for `domains/frontend/mem-client/src/**/constants.ts`. Trigger: - A PR adds or changes an exported `as const` array. Approval checks: 1) Each exported `as const` array has an exported union type companion using `(typeof ARRAY_NAME)[number]` (or equivalent derived-literal type expression). Evidence: - Diff shows array export and companion type export together. Decision: - Return NOT APPROVED when trigger is met and the companion union type export is missing.
Cancel
Save Policy