File tree 10 files changed +154
-1
lines changed
tests/baselines/reference
10 files changed +154
-1
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,7 @@ var definitionsRoots = [
111
111
"compiler/parser.d.ts" ,
112
112
"compiler/checker.d.ts" ,
113
113
"compiler/program.d.ts" ,
114
+ "compiler/commandLineParser.d.ts" ,
114
115
"services/services.d.ts" ,
115
116
] ;
116
117
Original file line number Diff line number Diff line change 4
4
/// <reference path="scanner.ts"/>
5
5
6
6
module ts {
7
+ /* @internal */
7
8
export var optionDeclarations : CommandLineOption [ ] = [
8
9
{
9
10
name : "charset" ,
@@ -157,7 +158,8 @@ module ts {
157
158
description : Diagnostics . Watch_input_files ,
158
159
}
159
160
] ;
160
-
161
+
162
+ /* @internal */
161
163
export function parseCommandLine ( commandLine : string [ ] ) : ParsedCommandLine {
162
164
var options : CompilerOptions = { } ;
163
165
var fileNames : string [ ] = [ ] ;
@@ -267,6 +269,10 @@ module ts {
267
269
}
268
270
}
269
271
272
+ /**
273
+ * Read tsconfig.json file
274
+ * @param fileName The path to the config file
275
+ */
270
276
export function readConfigFile ( fileName : string ) : any {
271
277
try {
272
278
var text = sys . readFile ( fileName ) ;
@@ -276,6 +282,12 @@ module ts {
276
282
}
277
283
}
278
284
285
+ /**
286
+ * Parse the contents of a config file (tsconfig.json).
287
+ * @param json The contents of the config file to parse
288
+ * @param basePath A root directory to resolve relative path entries in the config
289
+ * file to. e.g. outDir
290
+ */
279
291
export function parseConfigFile ( json : any , basePath ?: string ) : ParsedCommandLine {
280
292
var errors : Diagnostic [ ] = [ ] ;
281
293
Original file line number Diff line number Diff line change @@ -1504,6 +1504,20 @@ declare module "typescript" {
1504
1504
function flattenDiagnosticMessageText ( messageText : string | DiagnosticMessageChain , newLine : string ) : string ;
1505
1505
function createProgram ( rootNames : string [ ] , options : CompilerOptions , host ?: CompilerHost ) : Program ;
1506
1506
}
1507
+ declare module "typescript " {
1508
+ /**
1509
+ * Read tsconfig.json file
1510
+ * @param fileName The path to the config file
1511
+ */
1512
+ function readConfigFile ( fileName : string ) : any ;
1513
+ /**
1514
+ * Parse the contents of a config file (tsconfig.json).
1515
+ * @param json The contents of the config file to parse
1516
+ * @param basePath A root directory to resolve relative path entries in the config
1517
+ * file to. e.g. outDir
1518
+ */
1519
+ function parseConfigFile ( json : any , basePath ?: string ) : ParsedCommandLine ;
1520
+ }
1507
1521
declare module "typescript " {
1508
1522
/** The version of the language service API */
1509
1523
let servicesVersion : string ;
Original file line number Diff line number Diff line change @@ -4838,6 +4838,27 @@ declare module "typescript" {
4838
4838
>CompilerHost : CompilerHost
4839
4839
>Program : Program
4840
4840
}
4841
+ declare module "typescript" {
4842
+ /**
4843
+ * Read tsconfig.json file
4844
+ * @param fileName The path to the config file
4845
+ */
4846
+ function readConfigFile(fileName: string): any;
4847
+ >readConfigFile : (fileName: string) => any
4848
+ >fileName : string
4849
+
4850
+ /**
4851
+ * Parse the contents of a config file (tsconfig.json).
4852
+ * @param json The contents of the config file to parse
4853
+ * @param basePath A root directory to resolve relative path entries in the config
4854
+ * file to. e.g. outDir
4855
+ */
4856
+ function parseConfigFile(json: any, basePath?: string): ParsedCommandLine;
4857
+ >parseConfigFile : (json: any, basePath?: string) => ParsedCommandLine
4858
+ >json : any
4859
+ >basePath : string
4860
+ >ParsedCommandLine : ParsedCommandLine
4861
+ }
4841
4862
declare module "typescript" {
4842
4863
/** The version of the language service API */
4843
4864
let servicesVersion: string;
Original file line number Diff line number Diff line change @@ -1535,6 +1535,20 @@ declare module "typescript" {
1535
1535
function flattenDiagnosticMessageText ( messageText : string | DiagnosticMessageChain , newLine : string ) : string ;
1536
1536
function createProgram ( rootNames : string [ ] , options : CompilerOptions , host ?: CompilerHost ) : Program ;
1537
1537
}
1538
+ declare module "typescript " {
1539
+ /**
1540
+ * Read tsconfig.json file
1541
+ * @param fileName The path to the config file
1542
+ */
1543
+ function readConfigFile ( fileName : string ) : any ;
1544
+ /**
1545
+ * Parse the contents of a config file (tsconfig.json).
1546
+ * @param json The contents of the config file to parse
1547
+ * @param basePath A root directory to resolve relative path entries in the config
1548
+ * file to. e.g. outDir
1549
+ */
1550
+ function parseConfigFile ( json : any , basePath ?: string ) : ParsedCommandLine ;
1551
+ }
1538
1552
declare module "typescript " {
1539
1553
/** The version of the language service API */
1540
1554
let servicesVersion : string ;
Original file line number Diff line number Diff line change @@ -4984,6 +4984,27 @@ declare module "typescript" {
4984
4984
>CompilerHost : CompilerHost
4985
4985
>Program : Program
4986
4986
}
4987
+ declare module "typescript" {
4988
+ /**
4989
+ * Read tsconfig.json file
4990
+ * @param fileName The path to the config file
4991
+ */
4992
+ function readConfigFile(fileName: string): any;
4993
+ >readConfigFile : (fileName: string) => any
4994
+ >fileName : string
4995
+
4996
+ /**
4997
+ * Parse the contents of a config file (tsconfig.json).
4998
+ * @param json The contents of the config file to parse
4999
+ * @param basePath A root directory to resolve relative path entries in the config
5000
+ * file to. e.g. outDir
5001
+ */
5002
+ function parseConfigFile(json: any, basePath?: string): ParsedCommandLine;
5003
+ >parseConfigFile : (json: any, basePath?: string) => ParsedCommandLine
5004
+ >json : any
5005
+ >basePath : string
5006
+ >ParsedCommandLine : ParsedCommandLine
5007
+ }
4987
5008
declare module "typescript" {
4988
5009
/** The version of the language service API */
4989
5010
let servicesVersion: string;
Original file line number Diff line number Diff line change @@ -1536,6 +1536,20 @@ declare module "typescript" {
1536
1536
function flattenDiagnosticMessageText ( messageText : string | DiagnosticMessageChain , newLine : string ) : string ;
1537
1537
function createProgram ( rootNames : string [ ] , options : CompilerOptions , host ?: CompilerHost ) : Program ;
1538
1538
}
1539
+ declare module "typescript " {
1540
+ /**
1541
+ * Read tsconfig.json file
1542
+ * @param fileName The path to the config file
1543
+ */
1544
+ function readConfigFile ( fileName : string ) : any ;
1545
+ /**
1546
+ * Parse the contents of a config file (tsconfig.json).
1547
+ * @param json The contents of the config file to parse
1548
+ * @param basePath A root directory to resolve relative path entries in the config
1549
+ * file to. e.g. outDir
1550
+ */
1551
+ function parseConfigFile ( json : any , basePath ?: string ) : ParsedCommandLine ;
1552
+ }
1539
1553
declare module "typescript " {
1540
1554
/** The version of the language service API */
1541
1555
let servicesVersion : string ;
Original file line number Diff line number Diff line change @@ -4934,6 +4934,27 @@ declare module "typescript" {
4934
4934
>CompilerHost : CompilerHost
4935
4935
>Program : Program
4936
4936
}
4937
+ declare module "typescript" {
4938
+ /**
4939
+ * Read tsconfig.json file
4940
+ * @param fileName The path to the config file
4941
+ */
4942
+ function readConfigFile(fileName: string): any;
4943
+ >readConfigFile : (fileName: string) => any
4944
+ >fileName : string
4945
+
4946
+ /**
4947
+ * Parse the contents of a config file (tsconfig.json).
4948
+ * @param json The contents of the config file to parse
4949
+ * @param basePath A root directory to resolve relative path entries in the config
4950
+ * file to. e.g. outDir
4951
+ */
4952
+ function parseConfigFile(json: any, basePath?: string): ParsedCommandLine;
4953
+ >parseConfigFile : (json: any, basePath?: string) => ParsedCommandLine
4954
+ >json : any
4955
+ >basePath : string
4956
+ >ParsedCommandLine : ParsedCommandLine
4957
+ }
4937
4958
declare module "typescript" {
4938
4959
/** The version of the language service API */
4939
4960
let servicesVersion: string;
Original file line number Diff line number Diff line change @@ -1573,6 +1573,20 @@ declare module "typescript" {
1573
1573
function flattenDiagnosticMessageText ( messageText : string | DiagnosticMessageChain , newLine : string ) : string ;
1574
1574
function createProgram ( rootNames : string [ ] , options : CompilerOptions , host ?: CompilerHost ) : Program ;
1575
1575
}
1576
+ declare module "typescript " {
1577
+ /**
1578
+ * Read tsconfig.json file
1579
+ * @param fileName The path to the config file
1580
+ */
1581
+ function readConfigFile ( fileName : string ) : any ;
1582
+ /**
1583
+ * Parse the contents of a config file (tsconfig.json).
1584
+ * @param json The contents of the config file to parse
1585
+ * @param basePath A root directory to resolve relative path entries in the config
1586
+ * file to. e.g. outDir
1587
+ */
1588
+ function parseConfigFile ( json : any , basePath ?: string ) : ParsedCommandLine ;
1589
+ }
1576
1590
declare module "typescript " {
1577
1591
/** The version of the language service API */
1578
1592
let servicesVersion : string ;
Original file line number Diff line number Diff line change @@ -5107,6 +5107,27 @@ declare module "typescript" {
5107
5107
>CompilerHost : CompilerHost
5108
5108
>Program : Program
5109
5109
}
5110
+ declare module "typescript" {
5111
+ /**
5112
+ * Read tsconfig.json file
5113
+ * @param fileName The path to the config file
5114
+ */
5115
+ function readConfigFile(fileName: string): any;
5116
+ >readConfigFile : (fileName: string) => any
5117
+ >fileName : string
5118
+
5119
+ /**
5120
+ * Parse the contents of a config file (tsconfig.json).
5121
+ * @param json The contents of the config file to parse
5122
+ * @param basePath A root directory to resolve relative path entries in the config
5123
+ * file to. e.g. outDir
5124
+ */
5125
+ function parseConfigFile(json: any, basePath?: string): ParsedCommandLine;
5126
+ >parseConfigFile : (json: any, basePath?: string) => ParsedCommandLine
5127
+ >json : any
5128
+ >basePath : string
5129
+ >ParsedCommandLine : ParsedCommandLine
5130
+ }
5110
5131
declare module "typescript" {
5111
5132
/** The version of the language service API */
5112
5133
let servicesVersion: string;
You can’t perform that action at this time.
0 commit comments