Skip to content

With @angular/languageservice, non-Angular HTML file report lots of errors as they're parsed as TypeScript #31423

Closed

Description

TypeScript Version: 2.8.3 (@angular/languageservice 7.2.9)

Search Terms: Language Service HTML parsing errors

Context: I'm starting the typescript-language-server (delegating to tsserver) adding the @angular/language-service as plugin to typescript.
When opening an HTML that does not have any Angular-specific content
Expected behavior: the typescript-language-server ignores the file, not specific errors are reported
Actual behavior: a lot of errors are reported for such non Angular HTML, the errors are TypeScript parser errors. It seems like tsserver decides to parse this .html file as a .ts one.

Activity

  1. added
    External
    on May 17, 2019
  2. RyanCavanaugh commented on May 17, 2019

    @RyanCavanaugh
    Member

    TypeScript can't prevent editors or external components from asking it to parse HTML files as if they were TS. Whoever is doing this needs to stop.

  3. mickaelistria commented on May 17, 2019

    @mickaelistria
    Author

    See angular/vscode-ng-language-service#317 (comment) . I don't really understand everything here as I'm more on the plain consumer side and don't know any detail about how Typescript-language-server works; but with the linked comment and yours, it seems to me the issue is fully on @angular/language-service, isn't it?
    If it is so, feel free to close this ticket.

  4. typescript-bot commented on May 20, 2019

    @typescript-bot
    Contributor

    This issue has been marked as 'External' and has seen no recent activity. It has been automatically closed for house-keeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    External

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions