Skip to content

Typescript syntax highlighting breaks after Generic<typeof x> #846

@connor4312

Description

@connor4312

Happens on TS 4.1.2 as well as their nightly 4.2.0-dev.20201211. However it doesn't happen in the TS playground, which is why I'm opening an issue here (initially)

  1. Have code like:
function foo(): number { return 42; }
let bar: ReturnType<typeof foo>;
bar = 1;
foo();
new Uint8Array();
  1. Notice highlighting breaks after the let statement:

Playground is okay: https://www.typescriptlang.org/play?#code/GYVwdgxgLglg9mABMOcAUBKAXIsIC2ARgKYBOiA3oqcVCKUgCwBMA3IgL4BQANrYoQCGpHACVa9MABUAngAdiAHijzicYMlQA+VlyHkAvIgCMulOgy6wxAO6IAqjDBQAHAEFSpQTMysgA

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions