MCPcopy Index your code
hub / github.com/markdoc/markdoc / hasValidLocation

Function hasValidLocation

src/validator.ts:308–318  ·  view source on GitHub ↗
(
  error: ValidationError
)

Source from the content-addressed store, hash-verified

306}
307
308function hasValidLocation(
309 error: ValidationError
310): error is ValidationError & { location: Location } {
311 const loc = error.location;
312 return (
313 loc != null &&
314 typeof loc.start?.line === 'number' &&
315 typeof loc.end?.line === 'number' &&
316 (loc.file === undefined || typeof loc.file === 'string')
317 );
318}
319
320function toValidateError(
321 node: { type: string; lines: number[]; location?: Location },

Callers 1

toValidateErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…