tcd / dark-plus-syntax

VS Code's default dark theme, but just a little bit better.
https://marketplace.visualstudio.com/items?itemName=dunstontc.dark-plus-syntax
Other
56 stars 14 forks source link

Incorrect colors for some specific cases in typescript #10

Closed Dassderdie closed 4 years ago

Dassderdie commented 4 years ago

Hi there :)

I stumbled today over these two highlighting errors in typescript. I'm not sure wehter these inconsistencies are caused by this theme or not, but I don't know where else to create this issue.

image

type veryLongLongLongTypeName1 = { [key: string]: any };
type veryVeryLongLongLongTypeName2 = { [key: string]: any };

function LoremIpsumFunc(
    // the color should be light blue for a variable
    param: (
        | veryLongLongLongTypeName1
        | veryVeryLongLongLongTypeName2
    )["veryLongKey"]
) {
    return param;
}

class A {
    public LoremIpsumFunc<
        // the color should be green for all the types and dark blue for 'extends'
        T extends veryLongLongLongTypeName1 | veryVeryLongLongLongTypeName2
    >(param: T) {
        return param;
    }
}
Dassderdie commented 4 years ago

Ok - I just figured out that https://github.com/microsoft/TypeScript-TmLanguage is the correct place for this issue and it seems this is a sadly by design: https://github.com/microsoft/TypeScript-TmLanguage/issues/479