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

Function normalizeRuntimeLimit

src/api/TaskNotesAPI.ts:3080–3095  ·  view source on GitHub ↗
(
	value: unknown,
	path: string,
	issues: TaskNotesRuntimeQueryIssue[]
)

Source from the content-addressed store, hash-verified

3078}
3079
3080function normalizeRuntimeLimit(
3081 value: unknown,
3082 path: string,
3083 issues: TaskNotesRuntimeQueryIssue[]
3084): number | undefined {
3085 if (typeof value === "undefined" || value === null) return undefined;
3086 if (typeof value !== "number" || !Number.isInteger(value) || value <= 0) {
3087 issues.push({
3088 path,
3089 code: "limit_invalid",
3090 message: "Runtime query limit must be a positive integer.",
3091 });
3092 return undefined;
3093 }
3094 return value;
3095}
3096
3097function normalizeRuntimeOffset(
3098 value: unknown,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected