@@ -2896,7 +2896,7 @@ declare namespace ts {
2896
2896
interface FileWatcher {
2897
2897
close ( ) : void ;
2898
2898
}
2899
- function getNodeMajorVersion ( ) : number ;
2899
+ function getNodeMajorVersion ( ) : number | undefined ;
2900
2900
let sys : System ;
2901
2901
}
2902
2902
declare namespace ts {
@@ -2906,12 +2906,12 @@ declare namespace ts {
2906
2906
function textSpanContainsPosition ( span : TextSpan , position : number ) : boolean ;
2907
2907
function textSpanContainsTextSpan ( span : TextSpan , other : TextSpan ) : boolean ;
2908
2908
function textSpanOverlapsWith ( span : TextSpan , other : TextSpan ) : boolean ;
2909
- function textSpanOverlap ( span1 : TextSpan , span2 : TextSpan ) : TextSpan ;
2909
+ function textSpanOverlap ( span1 : TextSpan , span2 : TextSpan ) : TextSpan | undefined ;
2910
2910
function textSpanIntersectsWithTextSpan ( span : TextSpan , other : TextSpan ) : boolean ;
2911
2911
function textSpanIntersectsWith ( span : TextSpan , start : number , length : number ) : boolean ;
2912
2912
function decodedTextSpanIntersectsWith ( start1 : number , length1 : number , start2 : number , length2 : number ) : boolean ;
2913
2913
function textSpanIntersectsWithPosition ( span : TextSpan , position : number ) : boolean ;
2914
- function textSpanIntersection ( span1 : TextSpan , span2 : TextSpan ) : TextSpan ;
2914
+ function textSpanIntersection ( span1 : TextSpan , span2 : TextSpan ) : TextSpan | undefined ;
2915
2915
function createTextSpan ( start : number , length : number ) : TextSpan ;
2916
2916
function createTextSpanFromBounds ( start : number , end : number ) : TextSpan ;
2917
2917
function textChangeRangeNewSpan ( range : TextChangeRange ) : TextSpan ;
@@ -3293,8 +3293,8 @@ declare namespace ts {
3293
3293
function forEachLeadingCommentRange < T , U > ( text : string , pos : number , cb : ( pos : number , end : number , kind : CommentKind , hasTrailingNewLine : boolean , state : T ) => U , state : T ) : U | undefined ;
3294
3294
function forEachTrailingCommentRange < U > ( text : string , pos : number , cb : ( pos : number , end : number , kind : CommentKind , hasTrailingNewLine : boolean ) => U ) : U | undefined ;
3295
3295
function forEachTrailingCommentRange < T , U > ( text : string , pos : number , cb : ( pos : number , end : number , kind : CommentKind , hasTrailingNewLine : boolean , state : T ) => U , state : T ) : U | undefined ;
3296
- function reduceEachLeadingCommentRange < T , U > ( text : string , pos : number , cb : ( pos : number , end : number , kind : CommentKind , hasTrailingNewLine : boolean , state : T , memo : U ) => U , state : T , initial : U ) : U ;
3297
- function reduceEachTrailingCommentRange < T , U > ( text : string , pos : number , cb : ( pos : number , end : number , kind : CommentKind , hasTrailingNewLine : boolean , state : T , memo : U ) => U , state : T , initial : U ) : U ;
3296
+ function reduceEachLeadingCommentRange < T , U > ( text : string , pos : number , cb : ( pos : number , end : number , kind : CommentKind , hasTrailingNewLine : boolean , state : T , memo : U ) => U , state : T , initial : U ) : U | undefined ;
3297
+ function reduceEachTrailingCommentRange < T , U > ( text : string , pos : number , cb : ( pos : number , end : number , kind : CommentKind , hasTrailingNewLine : boolean , state : T , memo : U ) => U , state : T , initial : U ) : U | undefined ;
3298
3298
function getLeadingCommentRanges ( text : string , pos : number ) : CommentRange [ ] | undefined ;
3299
3299
function getTrailingCommentRanges ( text : string , pos : number ) : CommentRange [ ] | undefined ;
3300
3300
/** Optionally, get the shebang */
@@ -3797,7 +3797,7 @@ declare namespace ts {
3797
3797
/**
3798
3798
* Gets the constant value to emit for an expression.
3799
3799
*/
3800
- function getConstantValue ( node : PropertyAccessExpression | ElementAccessExpression ) : string | number ;
3800
+ function getConstantValue ( node : PropertyAccessExpression | ElementAccessExpression ) : string | number | undefined ;
3801
3801
/**
3802
3802
* Sets the constant value to emit for an expression.
3803
3803
*/
@@ -7440,7 +7440,7 @@ declare namespace ts.server {
7440
7440
clear ( ) : void ;
7441
7441
getVersion ( ) : number ;
7442
7442
remove ( path : Path ) : void ;
7443
- get ( path : Path ) : ReadonlyArray < string > ;
7443
+ get ( path : Path ) : ReadonlyArray < string > | undefined ;
7444
7444
set ( path : Path , value : ReadonlyArray < string > ) : void ;
7445
7445
}
7446
7446
interface PluginCreateInfo {
@@ -7557,7 +7557,7 @@ declare namespace ts.server {
7557
7557
abstract getTypeAcquisition ( ) : TypeAcquisition ;
7558
7558
protected removeLocalTypingsFromTypeAcquisition ( newTypeAcquisition : TypeAcquisition ) : TypeAcquisition ;
7559
7559
getExternalFiles ( ) : SortedReadonlyArray < string > ;
7560
- getSourceFile ( path : Path ) : SourceFile ;
7560
+ getSourceFile ( path : Path ) : SourceFile | undefined ;
7561
7561
close ( ) : void ;
7562
7562
private detachScriptInfoIfNotRoot ( uncheckedFilename ) ;
7563
7563
isClosed ( ) : boolean ;
@@ -7586,8 +7586,8 @@ declare namespace ts.server {
7586
7586
private detachScriptInfoFromProject ( uncheckedFileName ) ;
7587
7587
private addMissingFileWatcher ( missingFilePath ) ;
7588
7588
private isWatchedMissingFile ( path ) ;
7589
- getScriptInfoForNormalizedPath ( fileName : NormalizedPath ) : ScriptInfo ;
7590
- getScriptInfo ( uncheckedFileName : string ) : ScriptInfo ;
7589
+ getScriptInfoForNormalizedPath ( fileName : NormalizedPath ) : ScriptInfo | undefined ;
7590
+ getScriptInfo ( uncheckedFileName : string ) : ScriptInfo | undefined ;
7591
7591
filesToString ( writeProjectFileNames : boolean ) : string ;
7592
7592
setCompilerOptions ( compilerOptions : CompilerOptions ) : void ;
7593
7593
protected removeRoot ( info : ScriptInfo ) : void ;
@@ -7846,7 +7846,7 @@ declare namespace ts.server {
7846
7846
setCompilerOptionsForInferredProjects ( projectCompilerOptions : protocol . ExternalProjectCompilerOptions , projectRootPath ?: string ) : void ;
7847
7847
findProject ( projectName : string ) : Project | undefined ;
7848
7848
getDefaultProjectForFile ( fileName : NormalizedPath , ensureProject : boolean ) : Project | undefined ;
7849
- getScriptInfoEnsuringProjectsUptoDate ( uncheckedFileName : string ) : ScriptInfo ;
7849
+ getScriptInfoEnsuringProjectsUptoDate ( uncheckedFileName : string ) : ScriptInfo | undefined ;
7850
7850
/**
7851
7851
* Ensures the project structures are upto date
7852
7852
* This means,
@@ -7930,18 +7930,18 @@ declare namespace ts.server {
7930
7930
private getOrCreateInferredProjectForProjectRootPathIfEnabled ( info , projectRootPath ) ;
7931
7931
private getOrCreateSingleInferredProjectIfEnabled ( ) ;
7932
7932
private createInferredProject ( currentDirectory , isSingleInferredProject ?, projectRootPath ?) ;
7933
- getScriptInfo ( uncheckedFileName : string ) : ScriptInfo ;
7933
+ getScriptInfo ( uncheckedFileName : string ) : ScriptInfo | undefined ;
7934
7934
private watchClosedScriptInfo ( info ) ;
7935
7935
private stopWatchingScriptInfo ( info ) ;
7936
7936
getOrCreateScriptInfoForNormalizedPath ( fileName : NormalizedPath , openedByClient : boolean , fileContent ?: string , scriptKind ?: ScriptKind , hasMixedContent ?: boolean , hostToQueryFileExistsOn ?: {
7937
7937
fileExists ( path : string ) : boolean ;
7938
- } ) : ScriptInfo ;
7938
+ } ) : ScriptInfo | undefined ;
7939
7939
private getOrCreateScriptInfoWorker ( fileName , currentDirectory , openedByClient , fileContent ?, scriptKind ?, hasMixedContent ?, hostToQueryFileExistsOn ?) ;
7940
7940
/**
7941
7941
* This gets the script info for the normalized path. If the path is not rooted disk path then the open script info with project root context is preferred
7942
7942
*/
7943
- getScriptInfoForNormalizedPath ( fileName : NormalizedPath ) : ScriptInfo ;
7944
- getScriptInfoForPath ( fileName : Path ) : ScriptInfo ;
7943
+ getScriptInfoForNormalizedPath ( fileName : NormalizedPath ) : ScriptInfo | undefined ;
7944
+ getScriptInfoForPath ( fileName : Path ) : ScriptInfo | undefined ;
7945
7945
setHostConfiguration ( args : protocol . ConfigureRequestArguments ) : void ;
7946
7946
closeLog ( ) : void ;
7947
7947
/**
0 commit comments