MCPcopy Create free account
hub / github.com/angular/angular / tsconfig

Method tsconfig

packages/compiler-cli/test/ngtsc/env.ts:263–286  ·  view source on GitHub ↗
(
    extraOpts: TsConfigOptions = {},
    compilerOptions?: TsCompilerOptions,
    files?: string[],
  )

Source from the content-addressed store, hash-verified

261 }
262
263 tsconfig(
264 extraOpts: TsConfigOptions = {},
265 compilerOptions?: TsCompilerOptions,
266 files?: string[],
267 ): void {
268 let tsconfig: {[key: string]: any} = {
269 extends: './tsconfig-base.json',
270 angularCompilerOptions: extraOpts,
271 };
272 if (files !== undefined) {
273 tsconfig['files'] = files;
274 }
275 if (compilerOptions !== undefined) {
276 tsconfig['compilerOptions'] = compilerOptions;
277 }
278 this.write('tsconfig.json', JSON.stringify(tsconfig, null, 2));
279
280 if (
281 extraOpts['_useHostForImportGeneration'] ||
282 extraOpts['_useHostForImportAndAliasGeneration']
283 ) {
284 setWrapHostForTest(makeWrapHost(new FileNameToModuleNameHost(this.fs)));
285 }
286 }
287
288 /**
289 * Run the compiler to completion, and assert that no errors occurred.

Callers 15

monorepo_spec.tsFile · 0.80
defer_spec.tsFile · 0.80
xi18n_spec.tsFile · 0.80
ngtsc_spec.tsFile · 0.80
scope_spec.tsFile · 0.80
hmr_spec.tsFile · 0.80

Calls 3

writeMethod · 0.95
setWrapHostForTestFunction · 0.90
makeWrapHostFunction · 0.85

Tested by

no test coverage detected