getCurrentDirectory is optional on LanguageServiceHost (as it inherits from GetEffectiveTypeRootsHost, and it is optional there), but calling createLanguageService with a host which does not implement getCurrentDirectory throws TypeError: host.getCurrentDirectory is not a function.
getCurrentDirectoryis optional onLanguageServiceHost(as it inherits fromGetEffectiveTypeRootsHost, and it is optional there), but callingcreateLanguageServicewith a host which does not implementgetCurrentDirectorythrowsTypeError: host.getCurrentDirectory is not a function.