@@ -45,7 +45,7 @@ namespace ts.projectSystem {
45
45
getLogFileName : ( ) : string => undefined
46
46
} ;
47
47
48
- export const { content : libFileContent } = Harness . getDefaultLibraryFile ( Harness . IO ) ;
48
+ const { content : libFileContent } = Harness . getDefaultLibraryFile ( Harness . IO ) ;
49
49
export const libFile : FileOrFolder = {
50
50
path : "/a/lib/lib.d.ts" ,
51
51
content : libFileContent
@@ -118,7 +118,7 @@ namespace ts.projectSystem {
118
118
return JSON . stringify ( { dependencies } ) ;
119
119
}
120
120
121
- export function getExecutingFilePathFromLibFile ( ) : string {
121
+ function getExecutingFilePathFromLibFile ( ) : string {
122
122
return combinePaths ( getDirectoryPath ( libFile . path ) , "tsc.js" ) ;
123
123
}
124
124
@@ -130,7 +130,7 @@ namespace ts.projectSystem {
130
130
return map ( fileNames , toExternalFile ) ;
131
131
}
132
132
133
- export class TestServerEventManager {
133
+ class TestServerEventManager {
134
134
public events : server . ProjectServiceEvent [ ] = [ ] ;
135
135
136
136
handler : server . ProjectServiceEventHandler = ( event : server . ProjectServiceEvent ) => {
@@ -143,7 +143,7 @@ namespace ts.projectSystem {
143
143
}
144
144
}
145
145
146
- export interface TestServerHostCreationParameters {
146
+ interface TestServerHostCreationParameters {
147
147
useCaseSensitiveFileNames ?: boolean ;
148
148
executingFilePath ?: string ;
149
149
currentDirectory ?: string ;
@@ -205,7 +205,7 @@ namespace ts.projectSystem {
205
205
return new TestSession ( opts ) ;
206
206
}
207
207
208
- export interface CreateProjectServiceParameters {
208
+ interface CreateProjectServiceParameters {
209
209
cancellationToken ?: HostCancellationToken ;
210
210
logger ?: server . Logger ;
211
211
useSingleInferredProject ?: boolean ;
@@ -253,15 +253,15 @@ namespace ts.projectSystem {
253
253
entries : FSEntry [ ] ;
254
254
}
255
255
256
- export function isFolder ( s : FSEntry ) : s is Folder {
256
+ function isFolder ( s : FSEntry ) : s is Folder {
257
257
return isArray ( ( < Folder > s ) . entries ) ;
258
258
}
259
259
260
- export function isFile ( s : FSEntry ) : s is File {
260
+ function isFile ( s : FSEntry ) : s is File {
261
261
return typeof ( < File > s ) . content === "string" ;
262
262
}
263
263
264
- export function addFolder ( fullPath : string , toPath : ( s : string ) => Path , fs : Map < FSEntry > ) : Folder {
264
+ function addFolder ( fullPath : string , toPath : ( s : string ) => Path , fs : Map < FSEntry > ) : Folder {
265
265
const path = toPath ( fullPath ) ;
266
266
if ( fs . has ( path ) ) {
267
267
Debug . assert ( isFolder ( fs . get ( path ) ) ) ;
@@ -279,29 +279,29 @@ namespace ts.projectSystem {
279
279
return entry ;
280
280
}
281
281
282
- export function checkMapKeys ( caption : string , map : Map < any > , expectedKeys : string [ ] ) {
282
+ function checkMapKeys ( caption : string , map : Map < any > , expectedKeys : string [ ] ) {
283
283
assert . equal ( map . size , expectedKeys . length , `${ caption } : incorrect size of map` ) ;
284
284
for ( const name of expectedKeys ) {
285
285
assert . isTrue ( map . has ( name ) , `${ caption } is expected to contain ${ name } , actual keys: ${ arrayFrom ( map . keys ( ) ) } ` ) ;
286
286
}
287
287
}
288
288
289
- export function checkFileNames ( caption : string , actualFileNames : string [ ] , expectedFileNames : string [ ] ) {
289
+ function checkFileNames ( caption : string , actualFileNames : string [ ] , expectedFileNames : string [ ] ) {
290
290
assert . equal ( actualFileNames . length , expectedFileNames . length , `${ caption } : incorrect actual number of files, expected ${ JSON . stringify ( expectedFileNames ) } , got ${ actualFileNames } ` ) ;
291
291
for ( const f of expectedFileNames ) {
292
292
assert . isTrue ( contains ( actualFileNames , f ) , `${ caption } : expected to find ${ f } in ${ JSON . stringify ( actualFileNames ) } ` ) ;
293
293
}
294
294
}
295
295
296
- export function checkNumberOfConfiguredProjects ( projectService : server . ProjectService , expected : number ) {
296
+ function checkNumberOfConfiguredProjects ( projectService : server . ProjectService , expected : number ) {
297
297
assert . equal ( projectService . configuredProjects . length , expected , `expected ${ expected } configured project(s)` ) ;
298
298
}
299
299
300
- export function checkNumberOfExternalProjects ( projectService : server . ProjectService , expected : number ) {
300
+ function checkNumberOfExternalProjects ( projectService : server . ProjectService , expected : number ) {
301
301
assert . equal ( projectService . externalProjects . length , expected , `expected ${ expected } external project(s)` ) ;
302
302
}
303
303
304
- export function checkNumberOfInferredProjects ( projectService : server . ProjectService , expected : number ) {
304
+ function checkNumberOfInferredProjects ( projectService : server . ProjectService , expected : number ) {
305
305
assert . equal ( projectService . inferredProjects . length , expected , `expected ${ expected } inferred project(s)` ) ;
306
306
}
307
307
@@ -315,19 +315,19 @@ namespace ts.projectSystem {
315
315
checkMapKeys ( "watchedFiles" , host . watchedFiles , expectedFiles ) ;
316
316
}
317
317
318
- export function checkWatchedDirectories ( host : TestServerHost , expectedDirectories : string [ ] ) {
318
+ function checkWatchedDirectories ( host : TestServerHost , expectedDirectories : string [ ] ) {
319
319
checkMapKeys ( "watchedDirectories" , host . watchedDirectories , expectedDirectories ) ;
320
320
}
321
321
322
322
export function checkProjectActualFiles ( project : server . Project , expectedFiles : string [ ] ) {
323
323
checkFileNames ( `${ server . ProjectKind [ project . projectKind ] } project, actual files` , project . getFileNames ( ) , expectedFiles ) ;
324
324
}
325
325
326
- export function checkProjectRootFiles ( project : server . Project , expectedFiles : string [ ] ) {
326
+ function checkProjectRootFiles ( project : server . Project , expectedFiles : string [ ] ) {
327
327
checkFileNames ( `${ server . ProjectKind [ project . projectKind ] } project, rootFileNames` , project . getRootFiles ( ) , expectedFiles ) ;
328
328
}
329
329
330
- export class Callbacks {
330
+ class Callbacks {
331
331
private map : TimeOutCallback [ ] = [ ] ;
332
332
private nextId = 1 ;
333
333
@@ -363,7 +363,7 @@ namespace ts.projectSystem {
363
363
}
364
364
}
365
365
366
- export type TimeOutCallback = ( ) => any ;
366
+ type TimeOutCallback = ( ) => any ;
367
367
368
368
export class TestServerHost implements server . ServerHost {
369
369
args : string [ ] = [ ] ;
0 commit comments