@@ -14,8 +14,8 @@ namespace ts.textStorage {
1414
1515 const host = projectSystem . createServerHost ( [ f ] ) ;
1616 // Since script info is not used in these tests, just cheat by passing undefined
17- const ts1 = new server . TextStorage ( host , server . asNormalizedPath ( f . path ) , /*initialVersion*/ undefined , /*info*/ undefined ! ) ;
18- const ts2 = new server . TextStorage ( host , server . asNormalizedPath ( f . path ) , /*initialVersion*/ undefined , /*info*/ undefined ! ) ;
17+ const ts1 = new server . TextStorage ( host , server . asNormalizedPath ( f . path ) , /*initialVersion*/ undefined , { } as server . ScriptInfo ) ;
18+ const ts2 = new server . TextStorage ( host , server . asNormalizedPath ( f . path ) , /*initialVersion*/ undefined , { } as server . ScriptInfo ) ;
1919
2020 ts1 . useScriptVersionCache_TestOnly ( ) ;
2121 ts2 . useText ( ) ;
@@ -49,7 +49,7 @@ namespace ts.textStorage {
4949 it ( "should switch to script version cache if necessary" , ( ) => {
5050 const host = projectSystem . createServerHost ( [ f ] ) ;
5151 // Since script info is not used in these tests, just cheat by passing undefined
52- const ts1 = new server . TextStorage ( host , server . asNormalizedPath ( f . path ) , /*initialVersion*/ undefined , /*info*/ undefined ! ) ;
52+ const ts1 = new server . TextStorage ( host , server . asNormalizedPath ( f . path ) , /*initialVersion*/ undefined , { } as server . ScriptInfo ) ;
5353
5454 ts1 . getSnapshot ( ) ;
5555 assert . isFalse ( ts1 . hasScriptVersionCache_TestOnly ( ) , "should not have script version cache - 1" ) ;
@@ -67,15 +67,15 @@ namespace ts.textStorage {
6767 it ( "should be able to return the file size immediately after construction" , ( ) => {
6868 const host = projectSystem . createServerHost ( [ f ] ) ;
6969 // Since script info is not used in these tests, just cheat by passing undefined
70- const ts1 = new server . TextStorage ( host , server . asNormalizedPath ( f . path ) , /*initialVersion*/ undefined , /*info*/ undefined ! ) ;
70+ const ts1 = new server . TextStorage ( host , server . asNormalizedPath ( f . path ) , /*initialVersion*/ undefined , { } as server . ScriptInfo ) ;
7171
7272 assert . strictEqual ( f . content . length , ts1 . getTelemetryFileSize ( ) ) ;
7373 } ) ;
7474
7575 it ( "should be able to return the file size when backed by text" , ( ) => {
7676 const host = projectSystem . createServerHost ( [ f ] ) ;
7777 // Since script info is not used in these tests, just cheat by passing undefined
78- const ts1 = new server . TextStorage ( host , server . asNormalizedPath ( f . path ) , /*initialVersion*/ undefined , /*info*/ undefined ! ) ;
78+ const ts1 = new server . TextStorage ( host , server . asNormalizedPath ( f . path ) , /*initialVersion*/ undefined , { } as server . ScriptInfo ) ;
7979
8080 ts1 . useText ( f . content ) ;
8181 assert . isFalse ( ts1 . hasScriptVersionCache_TestOnly ( ) ) ;
@@ -86,7 +86,7 @@ namespace ts.textStorage {
8686 it ( "should be able to return the file size when backed by a script version cache" , ( ) => {
8787 const host = projectSystem . createServerHost ( [ f ] ) ;
8888 // Since script info is not used in these tests, just cheat by passing undefined
89- const ts1 = new server . TextStorage ( host , server . asNormalizedPath ( f . path ) , /*initialVersion*/ undefined , /*info*/ undefined ! ) ;
89+ const ts1 = new server . TextStorage ( host , server . asNormalizedPath ( f . path ) , /*initialVersion*/ undefined , { } as server . ScriptInfo ) ;
9090
9191 ts1 . useScriptVersionCache_TestOnly ( ) ;
9292 assert . isTrue ( ts1 . hasScriptVersionCache_TestOnly ( ) ) ;
@@ -126,7 +126,7 @@ namespace ts.textStorage {
126126
127127 const host = projectSystem . createServerHost ( [ changingFile ] ) ;
128128 // Since script info is not used in these tests, just cheat by passing undefined
129- const ts1 = new server . TextStorage ( host , server . asNormalizedPath ( changingFile . path ) , /*initialVersion*/ undefined , /*info*/ undefined ! ) ;
129+ const ts1 = new server . TextStorage ( host , server . asNormalizedPath ( changingFile . path ) , /*initialVersion*/ undefined , { } as server . ScriptInfo ) ;
130130
131131 assert . isTrue ( ts1 . reloadFromDisk ( ) ) ;
132132
0 commit comments