MCPcopy Create free account
hub / github.com/freeCodeCamp/freeCodeCamp / getTSConfig

Function getTSConfig

packages/challenge-builder/src/build.ts:187–197  ·  view source on GitHub ↗
(challengeFiles: ChallengeFile[])

Source from the content-addressed store, hash-verified

185 f.name === 'tsconfig' && f.ext === 'json';
186
187export function getTSConfig(challengeFiles: ChallengeFile[]) {
188 const tsConfigFiles = challengeFiles.filter(isTSConfig);
189
190 if (tsConfigFiles.length > 1) {
191 throw new Error(
192 'TypeScript challenge must include only one tsconfig.json file'
193 );
194 }
195
196 return tsConfigFiles.length === 1 ? tsConfigFiles[0].contents : null;
197}
198
199async function configureTSCompiler(challengeFiles: ChallengeFile[]) {
200 if (hasTS(challengeFiles)) {

Callers 2

build.test.tsFile · 0.90
configureTSCompilerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected