MCPcopy Create free account
hub / github.com/Effect-TS/effect / parseAnnotation

Function parseAnnotation

packages/tools/utils/src/Codegen.ts:60–66  ·  view source on GitHub ↗
(line: string)

Source from the content-addressed store, hash-verified

58}
59
60const parseAnnotation = (line: string): string | undefined => {
61 const match = line.match(/^\/\/\s*@barrel(?:\((.+?)\))?/)
62 if (!match) {
63 return undefined
64 }
65 return match[1] ?? "*.ts"
66}
67
68const extractModuleSince = (file: string, content: string): Effect.Effect<string, BarrelCodegenError> => {
69 const block = content.match(/^\s*(\/\*\*[\s\S]*?\*\/)/)?.[1]

Callers 1

findAnnotationFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected