MCPcopy Index your code
hub / github.com/angular/angular / tsconfig

Method tsconfig

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

Source from the content-addressed store, hash-verified

225 }
226
227 tsconfig(
228 extraOpts: TsConfigOptions = {},
229 compilerOptions?: TsCompilerOptions,
230 files?: string[],
231 ): void {
232 // TODO: all tests should have template that pass strictness
233 if (!('strictTemplates' in extraOpts)) {
234 extraOpts['strictTemplates'] = false;
235 }
236
237 let tsconfig: {[key: string]: any} = {
238 extends: './tsconfig-base.json',
239 angularCompilerOptions: extraOpts,
240 };
241 if (files !== undefined) {
242 tsconfig['files'] = files;
243 }
244 if (compilerOptions !== undefined) {
245 tsconfig['compilerOptions'] = compilerOptions;
246 }
247 this.write('tsconfig.json', JSON.stringify(tsconfig, null, 2));
248
249 if (
250 extraOpts['_useHostForImportGeneration'] ||
251 extraOpts['_useHostForImportAndAliasGeneration']
252 ) {
253 setWrapHostForTest(makeWrapHost(new FileNameToModuleNameHost(this.fs)));
254 }
255 }
256
257 /**
258 * 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