MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / loadTsConfig

Function loadTsConfig

lib/utils/typescript.js:10–21  ·  view source on GitHub ↗

* Load tsconfig.json if it exists * @param {string} tsConfigPath - Path to tsconfig.json * @returns {object|null} - Parsed tsconfig or null

(tsConfigPath)

Source from the content-addressed store, hash-verified

8 * @returns {object|null} - Parsed tsconfig or null
9 */
10function loadTsConfig(tsConfigPath) {
11 if (!fs.existsSync(tsConfigPath)) {
12 return null
13 }
14
15 try {
16 const tsConfigContent = fs.readFileSync(tsConfigPath, 'utf8')
17 return JSON.parse(tsConfigContent)
18 } catch (err) {
19 return null
20 }
21}
22
23/**
24 * Resolve TypeScript path alias to actual file path

Callers 1

transpileTypeScriptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected