Skip to content

Highlighting of TypeScript method that returns a union #1041

@cshaa

Description

@cshaa

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.92.2
  • OS Version: elementary OS 7.1, based on Ubuntu 22.04.3 LTS

Steps to Reproduce:

  1. Create a new file and choose TypeScript as the language
  2. Paste the following code:
class Foo {
  foo():
    | string
    | Array<number> {
      const foo = 42;
      return [foo];
    }
}
  1. See that the highlighting is broken

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions