(value: unknown)
| 3054 | } |
| 3055 | |
| 3056 | function normalizeRuntimeOperator(value: unknown): TaskNotesRuntimeOperator | null { |
| 3057 | if (typeof value !== "string") return null; |
| 3058 | const normalized = value.trim(); |
| 3059 | const exact = RUNTIME_OPERATOR_BY_ALIAS.get(normalized); |
| 3060 | if (exact) return exact; |
| 3061 | if ((TASKNOTES_RUNTIME_QUERY_OPERATORS as readonly string[]).includes(normalized)) { |
| 3062 | return normalized as TaskNotesRuntimeOperator; |
| 3063 | } |
| 3064 | return null; |
| 3065 | } |
| 3066 | |
| 3067 | function runtimeOperatorRequiresValue(operator: TaskNotesRuntimeOperator): boolean { |
| 3068 | return !["exists", "missing", "isTrue", "isFalse"].includes(operator); |
no test coverage detected