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

Function getProgram

packages/tools/jsdocs/src/Jsdocs.ts:1596–1610  ·  view source on GitHub ↗
(tsconfigPath: string)

Source from the content-addressed store, hash-verified

1594 * @since 4.0.0
1595 */
1596export function getProgram(tsconfigPath: string): ProgramCacheEntry {
1597 const cached = programCache.get(tsconfigPath)
1598 if (cached !== undefined) return cached
1599 const fileNames = new Set<string>()
1600 const result = collectTsConfigFiles(tsconfigPath, new Set(), fileNames)
1601 if (result.error !== undefined || result.parsed === undefined) {
1602 const entry = { error: result.error ?? `Unable to parse TypeScript config ${tsconfigPath}`, reported: false }
1603 programCache.set(tsconfigPath, entry)
1604 return entry
1605 }
1606 const program = ts.createProgram(Array.from(fileNames), result.parsed.options)
1607 const entry = { program, reported: false }
1608 programCache.set(tsconfigPath, entry)
1609 return entry
1610}
1611
1612function resolveJSDocLinkSymbol(
1613 link: ts.JSDocLink,

Callers 1

extractJSDocsSyncFunction · 0.85

Calls 3

collectTsConfigFilesFunction · 0.85
getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected