MCPcopy Index your code
hub / github.com/nodejs/node / verifyCompilerOptions

Function verifyCompilerOptions

test/fixtures/snapshot/typescript.js:118677–118941  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

118675 return resolvedRef;
118676 }
118677 function verifyCompilerOptions() {
118678 if (options.strictPropertyInitialization && !ts.getStrictOptionValue(options, "strictNullChecks")) {
118679 createDiagnosticForOptionName(ts.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "strictPropertyInitialization", "strictNullChecks");
118680 }
118681 if (options.exactOptionalPropertyTypes && !ts.getStrictOptionValue(options, "strictNullChecks")) {
118682 createDiagnosticForOptionName(ts.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "exactOptionalPropertyTypes", "strictNullChecks");
118683 }
118684 if (options.isolatedModules) {
118685 if (options.out) {
118686 createDiagnosticForOptionName(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "out", "isolatedModules");
118687 }
118688 if (options.outFile) {
118689 createDiagnosticForOptionName(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "outFile", "isolatedModules");
118690 }
118691 }
118692 if (options.inlineSourceMap) {
118693 if (options.sourceMap) {
118694 createDiagnosticForOptionName(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "sourceMap", "inlineSourceMap");
118695 }
118696 if (options.mapRoot) {
118697 createDiagnosticForOptionName(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "mapRoot", "inlineSourceMap");
118698 }
118699 }
118700 if (options.composite) {
118701 if (options.declaration === false) {
118702 createDiagnosticForOptionName(ts.Diagnostics.Composite_projects_may_not_disable_declaration_emit, "declaration");
118703 }
118704 if (options.incremental === false) {
118705 createDiagnosticForOptionName(ts.Diagnostics.Composite_projects_may_not_disable_incremental_compilation, "declaration");
118706 }
118707 }
118708 var outputFile = ts.outFile(options);
118709 if (options.tsBuildInfoFile) {
118710 if (!ts.isIncrementalCompilation(options)) {
118711 createDiagnosticForOptionName(ts.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "tsBuildInfoFile", "incremental", "composite");
118712 }
118713 }
118714 else if (options.incremental && !outputFile && !options.configFilePath) {
118715 programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified));
118716 }
118717 verifyProjectReferences();
118718 // List of collected files is complete; validate exhautiveness if this is a project with a file list
118719 if (options.composite) {
118720 var rootPaths = new ts.Set(rootNames.map(toPath));
118721 for (var _i = 0, files_4 = files; _i < files_4.length; _i++) {
118722 var file = files_4[_i];
118723 // Ignore file that is not emitted
118724 if (ts.sourceFileMayBeEmitted(file, program) && !rootPaths.has(file.path)) {
118725 addProgramDiagnosticExplainingFile(file, ts.Diagnostics.File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern, [file.fileName, options.configFilePath || ""]);
118726 }
118727 }
118728 }
118729 if (options.paths) {
118730 for (var key in options.paths) {
118731 if (!ts.hasProperty(options.paths, key)) {
118732 continue;
118733 }
118734 if (!ts.hasZeroOrOneAsteriskCharacter(key)) {

Callers 1

createProgramFunction · 0.85

Calls 15

verifyProjectReferencesFunction · 0.85
getCommonSourceDirectoryFunction · 0.85
getEmitHostFunction · 0.85
verifyEmitFilePathFunction · 0.85
someMethod · 0.80
addMethod · 0.65
mapMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…