MCPcopy
hub / github.com/callumalpass/tasknotes / userFieldTypeToRuntimeValueType

Function userFieldTypeToRuntimeValueType

src/api/TaskNotesAPI.ts:3362–3378  ·  view source on GitHub ↗
(
	type: string
)

Source from the content-addressed store, hash-verified

3360}
3361
3362function userFieldTypeToRuntimeValueType(
3363 type: string
3364): TaskNotesRuntimeFieldDefinition["valueType"] {
3365 switch (type) {
3366 case "number":
3367 return "number";
3368 case "date":
3369 return "date";
3370 case "boolean":
3371 return "boolean";
3372 case "list":
3373 return "string[]";
3374 case "text":
3375 default:
3376 return "string";
3377 }
3378}
3379
3380function coerceDateOption(value: string | Date | null | undefined): Date | null {
3381 if (!value) return null;

Callers 3

getFieldDefinitionsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected