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

Method tsconfig

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

Source from the content-addressed store, hash-verified

219 }
220
221 tsconfig(
222 extraOpts: TsConfigOptions = {},
223 compilerOptions?: TsCompilerOptions,
224 files?: string[],
225 ): void {
226 let tsconfig: {[key: string]: any} = {
227 extends: './tsconfig-base.json',
228 angularCompilerOptions: extraOpts,
229 };
230 if (files !== undefined) {
231 tsconfig['files'] = files;
232 }
233 if (compilerOptions !== undefined) {
234 tsconfig['compilerOptions'] = compilerOptions;
235 }
236 this.write('tsconfig.json', JSON.stringify(tsconfig, null, 2));
237
238 if (
239 extraOpts['_useHostForImportGeneration'] ||
240 extraOpts['_useHostForImportAndAliasGeneration']
241 ) {
242 setWrapHostForTest(makeWrapHost(new FileNameToModuleNameHost(this.fs)));
243 }
244 }
245
246 /**
247 * 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