Skip to content

getCurrentDirectory is marked as optional on LanguageServiceHost, but absence is an error #19278

Closed

Description

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.

Activity

  1. weswigham commented on Oct 18, 2017

    @weswigham
    MemberAuthor

    Mohamed Hegazy (@mhegazy) I don't think this is a breaking change. The change that made it optional was only comitted yesterday. Plus, we crash in createLanguageService if you actually don't provide it, so...

  2. mhegazy commented on Oct 18, 2017

    @mhegazy
    Contributor

    oh, i see. i thought the fix was to change GetEffectiveTypeRootsHost.getCurrentDirectory which is an overkill here.. you are correct. let's get this in then.

  3. locked and limited conversation to collaborators on Jun 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugA bug in TypeScriptDomain: APIRelates to the public API for TypeScript

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions