namespace ts . pxtc { export class LSHost implements ts . LanguageServiceHost { constructor ( private p ) { } getCompilationSettings ( ) { const opts = this . p . getCompilerOptions ( ) ; opts . noLib = true ; return opts ; } getNewLine ( ) { return "\n" ; } getScriptFileNames ( ) { return this . p . getSourceFiles ( ) . map ( f => f . fileName ) ; } getScriptVersion ( fileName ) { return "0" ; } getScriptSnapshot ( fileName ) { const f = this . p . getSourceFile ( fileName ) ; return { getLength : ( ) => f . getFullText ( ) . length , getText : ( ) => f . getFullText ( ) , getChangeRange : ( ) => undefined } ; } getCurrentDirectory ( ) { return "." ; } getDefaultLibFileName ( options ) { return "" ; } useCaseSensitiveFileNames ( ) { return true ; } } }