@@ -204,6 +204,8 @@ module ts {
204
204
}
205
205
206
206
export class LanguageServiceShimHostAdapter implements LanguageServiceHost {
207
+ private files : string [ ] ;
208
+
207
209
constructor ( private shimHost : LanguageServiceShimHost ) {
208
210
}
209
211
@@ -230,10 +232,15 @@ module ts {
230
232
231
233
public getScriptFileNames ( ) : string [ ] {
232
234
var encoded = this . shimHost . getScriptFileNames ( ) ;
233
- return JSON . parse ( encoded ) ;
235
+ return this . files = JSON . parse ( encoded ) ;
234
236
}
235
237
236
238
public getScriptSnapshot ( fileName : string ) : IScriptSnapshot {
239
+ // Shim the API changes for 1.5 release. This should be removed once
240
+ // TypeScript 1.5 has shipped.
241
+ if ( this . files && this . files . indexOf ( fileName ) < 0 ) {
242
+ return undefined ;
243
+ }
237
244
var scriptSnapshot = this . shimHost . getScriptSnapshot ( fileName ) ;
238
245
return scriptSnapshot && new ScriptSnapshotShimAdapter ( scriptSnapshot ) ;
239
246
}
@@ -266,7 +273,10 @@ module ts {
266
273
}
267
274
268
275
public getDefaultLibFileName ( options : CompilerOptions ) : string {
269
- return this . shimHost . getDefaultLibFileName ( JSON . stringify ( options ) ) ;
276
+ // Shim the API changes for 1.5 release. This should be removed once
277
+ // TypeScript 1.5 has shipped.
278
+ return "" ;
279
+ //return this.shimHost.getDefaultLibFileName(JSON.stringify(options));
270
280
}
271
281
}
272
282
@@ -662,6 +672,7 @@ module ts {
662
672
"getEmitOutput('" + fileName + "')" ,
663
673
( ) => {
664
674
var output = this . languageService . getEmitOutput ( fileName ) ;
675
+ ( < any > output ) . emitOutputStatus = output . emitSkipped ? 1 : 0 ;
665
676
return output ;
666
677
} ) ;
667
678
}
0 commit comments