@@ -35,6 +35,7 @@ declare module "typescript" {
35
35
function concatenate < T > ( array1 : T [ ] , array2 : T [ ] ) : T [ ] ;
36
36
function deduplicate < T > ( array : T [ ] ) : T [ ] ;
37
37
function sum ( array : any [ ] , prop : string ) : number ;
38
+ function addRange < T > ( to : T [ ] , from : T [ ] ) : void ;
38
39
/**
39
40
* Returns the last element of an array if non-empty, undefined otherwise.
40
41
*/
@@ -67,9 +68,9 @@ declare module "typescript" {
67
68
function createCompilerDiagnostic ( message : DiagnosticMessage , ...args : any [ ] ) : Diagnostic ;
68
69
function chainDiagnosticMessages ( details : DiagnosticMessageChain , message : DiagnosticMessage , ...args : any [ ] ) : DiagnosticMessageChain ;
69
70
function concatenateDiagnosticMessageChains ( headChain : DiagnosticMessageChain , tailChain : DiagnosticMessageChain ) : DiagnosticMessageChain ;
70
- function flattenDiagnosticChain ( file : SourceFile , start : number , length : number , diagnosticChain : DiagnosticMessageChain , newLine : string ) : Diagnostic ;
71
71
function compareValues < T > ( a : T , b : T ) : Comparison ;
72
- function compareDiagnostics ( d1 : Diagnostic , d2 : Diagnostic ) : number ;
72
+ function compareDiagnostics ( d1 : Diagnostic , d2 : Diagnostic ) : Comparison ;
73
+ function sortAndDeduplicateDiagnostics ( diagnostics : Diagnostic [ ] ) : Diagnostic [ ] ;
73
74
function deduplicateSortedDiagnostics ( diagnostics : Diagnostic [ ] ) : Diagnostic [ ] ;
74
75
function normalizeSlashes ( path : string ) : string ;
75
76
function getRootLength ( path : string ) : number ;
@@ -79,10 +80,10 @@ declare module "typescript" {
79
80
function isUrl ( path : string ) : boolean ;
80
81
function isRootedDiskPath ( path : string ) : boolean ;
81
82
function getNormalizedPathComponents ( path : string , currentDirectory : string ) : string [ ] ;
82
- function getNormalizedAbsolutePath ( filename : string , currentDirectory : string ) : string ;
83
+ function getNormalizedAbsolutePath ( fileName : string , currentDirectory : string ) : string ;
83
84
function getNormalizedPathFromPathComponents ( pathComponents : string [ ] ) : string ;
84
85
function getRelativePathToDirectoryOrUrl ( directoryPathOrUrl : string , relativeOrAbsolutePath : string , currentDirectory : string , getCanonicalFileName : ( fileName : string ) => string , isAbsolutePathAnUrl : boolean ) : string ;
85
- function getBaseFilename ( path : string ) : string ;
86
+ function getBaseFileName ( path : string ) : string ;
86
87
function combinePaths ( path1 : string , path2 : string ) : string ;
87
88
function fileExtensionIs ( path : string , extension : string ) : boolean ;
88
89
function removeFileExtension ( path : string ) : string ;
@@ -92,6 +93,7 @@ declare module "typescript" {
92
93
* Note that this doesn't actually wrap the input in double quotes.
93
94
*/
94
95
function escapeString ( s : string ) : string ;
96
+ function getDefaultLibFileName ( options : CompilerOptions ) : string ;
95
97
interface ObjectAllocator {
96
98
getNodeConstructor ( kind : SyntaxKind ) : new ( ) => Node ;
97
99
getSymbolConstructor ( ) : new ( flags : SymbolFlags , name : string ) => Symbol ;
@@ -147,11 +149,10 @@ declare module "typescript" {
147
149
}
148
150
interface EmitHost extends ScriptReferenceHost {
149
151
getSourceFiles ( ) : SourceFile [ ] ;
150
- isEmitBlocked ( sourceFile ?: SourceFile ) : boolean ;
151
152
getCommonSourceDirectory ( ) : string ;
152
153
getCanonicalFileName ( fileName : string ) : string ;
153
154
getNewLine ( ) : string ;
154
- writeFile ( filename : string , data : string , writeByteOrderMark : boolean , onError ?: ( message : string ) => void ) : void ;
155
+ writeFile : WriteFileCallback ;
155
156
}
156
157
function getSingleLineStringWriter ( ) : StringSymbolWriter ;
157
158
function releaseStringWriter ( writer : StringSymbolWriter ) : void ;
@@ -170,7 +171,7 @@ declare module "typescript" {
170
171
function unescapeIdentifier ( identifier : string ) : string ;
171
172
function declarationNameToString ( name : DeclarationName ) : string ;
172
173
function createDiagnosticForNode ( node : Node , message : DiagnosticMessage , arg0 ?: any , arg1 ?: any , arg2 ?: any ) : Diagnostic ;
173
- function createDiagnosticForNodeFromMessageChain ( node : Node , messageChain : DiagnosticMessageChain , newLine : string ) : Diagnostic ;
174
+ function createDiagnosticForNodeFromMessageChain ( node : Node , messageChain : DiagnosticMessageChain ) : Diagnostic ;
174
175
function getErrorSpanForNode ( node : Node ) : Node ;
175
176
function isExternalModule ( file : SourceFile ) : boolean ;
176
177
function isDeclarationFile ( file : SourceFile ) : boolean ;
@@ -216,7 +217,6 @@ declare module "typescript" {
216
217
function isKeyword ( token : SyntaxKind ) : boolean ;
217
218
function isTrivia ( token : SyntaxKind ) : boolean ;
218
219
function isModifier ( token : SyntaxKind ) : boolean ;
219
- function createEmitHostFromProgram ( program : Program ) : EmitHost ;
220
220
function textSpanEnd ( span : TextSpan ) : number ;
221
221
function textSpanIsEmpty ( span : TextSpan ) : boolean ;
222
222
function textSpanContainsPosition ( span : TextSpan , position : number ) : boolean ;
@@ -246,7 +246,7 @@ declare module "typescript" {
246
246
declare module "typescript" {
247
247
var optionDeclarations : CommandLineOption [ ] ;
248
248
function parseCommandLine ( commandLine : string [ ] ) : ParsedCommandLine ;
249
- function readConfigFile ( filename : string ) : any ;
249
+ function readConfigFile ( fileName : string ) : any ;
250
250
function parseConfigFile ( json : any , basePath ?: string ) : ParsedCommandLine ;
251
251
}
252
252
declare module "typescript" {
0 commit comments