MCPcopy Create free account
hub / github.com/effect-app/libs / parseLooseJSDocBlock

Function parseLooseJSDocBlock

repos/effect/packages/tools/jsdocs/src/Jsdocs.ts:887–895  ·  view source on GitHub ↗
(raw: string, range: [number, number])

Source from the content-addressed store, hash-verified

885/**
886 * Finds the JSDoc block immediately preceding an AST node.
887 *
888 * @category parsing
889 * @since 4.0.0
890 */
891export function findLeadingJSDoc(
892 source: string,
893 node: AstNode,
894 ignoredRange?: [number, number]
895): JSDocBlock | undefined {
896 const end = skipDirectiveComments(source, skipWhitespace(source, node.range[0]))
897 if (!source.slice(0, end).endsWith("*/")) {
898 return undefined

Callers 4

parseJSDocBlockFunction · 0.85
moduleSeeTagsFunction · 0.85
checkModuleExamplesFunction · 0.85
parseModuleJSDocTsFunction · 0.85

Calls 6

trimStructuralBlankLinesFunction · 0.85
parseTagsFunction · 0.85
someMethod · 0.80
splitMethod · 0.65
mapMethod · 0.65
replaceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…