mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
@@ -2260,7 +2260,7 @@
|
||||
"category": "Error",
|
||||
"code": 5047
|
||||
},
|
||||
"Option 'inlineSources' can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided.": {
|
||||
"Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided.": {
|
||||
"category": "Error",
|
||||
"code": 5051
|
||||
},
|
||||
|
||||
@@ -2043,12 +2043,12 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
if (options.inlineSources) {
|
||||
if (!options.sourceMap && !options.inlineSourceMap) {
|
||||
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_inlineSources_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided));
|
||||
if (!options.sourceMap && !options.inlineSourceMap) {
|
||||
if (options.inlineSources) {
|
||||
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided, "inlineSources"));
|
||||
}
|
||||
if (options.sourceRoot) {
|
||||
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_with_option_1, "sourceRoot", "inlineSources"));
|
||||
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided, "sourceRoot"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2056,14 +2056,9 @@ namespace ts {
|
||||
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_with_option_1, "out", "outFile"));
|
||||
}
|
||||
|
||||
if (!options.sourceMap && (options.mapRoot || options.sourceRoot)) {
|
||||
// Error to specify --mapRoot or --sourceRoot without mapSourceFiles
|
||||
if (options.mapRoot) {
|
||||
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "mapRoot", "sourceMap"));
|
||||
}
|
||||
if (options.sourceRoot && !options.inlineSourceMap) {
|
||||
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "sourceRoot", "sourceMap"));
|
||||
}
|
||||
if (options.mapRoot && !options.sourceMap) {
|
||||
// Error to specify --mapRoot without --sourcemap
|
||||
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "mapRoot", "sourceMap"));
|
||||
}
|
||||
|
||||
if (options.declarationDir) {
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
error TS5053: Option 'sourceRoot' cannot be specified with option 'inlineSources'.
|
||||
|
||||
|
||||
!!! error TS5053: Option 'sourceRoot' cannot be specified with option 'inlineSources'.
|
||||
==== tests/cases/compiler/optionsSourcemapInlineSourcesSourceRoot.ts (0 errors) ====
|
||||
|
||||
var a = 10;
|
||||
@@ -0,0 +1,5 @@
|
||||
=== tests/cases/compiler/optionsSourcemapInlineSourcesSourceRoot.ts ===
|
||||
|
||||
var a = 10;
|
||||
>a : Symbol(a, Decl(optionsSourcemapInlineSourcesSourceRoot.ts, 1, 3))
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
=== tests/cases/compiler/optionsSourcemapInlineSourcesSourceRoot.ts ===
|
||||
|
||||
var a = 10;
|
||||
>a : number
|
||||
>10 : number
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
error TS5051: Option 'sourceRoot can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided.
|
||||
error TS5052: Option 'mapRoot' cannot be specified without specifying option 'sourceMap'.
|
||||
error TS5052: Option 'sourceRoot' cannot be specified without specifying option 'sourceMap'.
|
||||
|
||||
|
||||
!!! error TS5051: Option 'sourceRoot can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided.
|
||||
!!! error TS5052: Option 'mapRoot' cannot be specified without specifying option 'sourceMap'.
|
||||
!!! error TS5052: Option 'sourceRoot' cannot be specified without specifying option 'sourceMap'.
|
||||
==== m1.ts (0 errors) ====
|
||||
var m1_a1 = 10;
|
||||
class m1_c1 {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
error TS5051: Option 'sourceRoot can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided.
|
||||
error TS5052: Option 'mapRoot' cannot be specified without specifying option 'sourceMap'.
|
||||
error TS5052: Option 'sourceRoot' cannot be specified without specifying option 'sourceMap'.
|
||||
|
||||
|
||||
!!! error TS5051: Option 'sourceRoot can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided.
|
||||
!!! error TS5052: Option 'mapRoot' cannot be specified without specifying option 'sourceMap'.
|
||||
!!! error TS5052: Option 'sourceRoot' cannot be specified without specifying option 'sourceMap'.
|
||||
==== m1.ts (0 errors) ====
|
||||
var m1_a1 = 10;
|
||||
class m1_c1 {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
error TS5052: Option 'sourceRoot' cannot be specified without specifying option 'sourceMap'.
|
||||
error TS5051: Option 'sourceRoot can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided.
|
||||
|
||||
|
||||
!!! error TS5052: Option 'sourceRoot' cannot be specified without specifying option 'sourceMap'.
|
||||
!!! error TS5051: Option 'sourceRoot can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided.
|
||||
==== m1.ts (0 errors) ====
|
||||
var m1_a1 = 10;
|
||||
class m1_c1 {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
error TS5052: Option 'sourceRoot' cannot be specified without specifying option 'sourceMap'.
|
||||
error TS5051: Option 'sourceRoot can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided.
|
||||
|
||||
|
||||
!!! error TS5052: Option 'sourceRoot' cannot be specified without specifying option 'sourceMap'.
|
||||
!!! error TS5051: Option 'sourceRoot can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided.
|
||||
==== m1.ts (0 errors) ====
|
||||
var m1_a1 = 10;
|
||||
class m1_c1 {
|
||||
|
||||
Reference in New Issue
Block a user