MCPcopy Index your code
hub / github.com/callumalpass/tasknotes / operatorsForRuntimeValueType

Function operatorsForRuntimeValueType

src/api/TaskNotesAPI.ts:3032–3046  ·  view source on GitHub ↗
(
	valueType: TaskNotesRuntimeFieldDefinition["valueType"]
)

Source from the content-addressed store, hash-verified

3030}
3031
3032function operatorsForRuntimeValueType(
3033 valueType: TaskNotesRuntimeFieldDefinition["valueType"]
3034): TaskNotesRuntimeOperator[] {
3035 if (valueType === "boolean") return ["isTrue", "isFalse"];
3036 if (valueType === "number") {
3037 return ["eq", "ne", "in", "notIn", "lt", "lte", "gt", "gte", "exists", "missing"];
3038 }
3039 if (valueType === "date" || valueType === "datetime") {
3040 return ["eq", "ne", "in", "notIn", "lt", "lte", "gt", "gte", "exists", "missing"];
3041 }
3042 if (valueType.endsWith("[]")) {
3043 return ["contains", "notContains", "exists", "missing"];
3044 }
3045 return ["eq", "ne", "in", "notIn", "contains", "notContains", "exists", "missing"];
3046}
3047
3048function userFieldTypeToFilterInputType(type: string): string {
3049 if (type === "number") return "number";

Callers 4

getFieldDefinitionsMethod · 0.85
runtimeFilterPropertyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected