Skip to content

asserts and declare in classes are not colored as a keyword #797

Closed
@AlCalzone

Description

@AlCalzone

TS and JS Grammar Extension version: The one included in VSCode 1.41.1

I was asked to split microsoft/TypeScript#35187 and open it here.

Code

function foo(x: any): asserts x is "a" {

}

class Foo {
    declare baz: any;
}

Expected behavior:
asserts is colored like the other keywords.
declare is colored like the other keywords.

Actual behavior:
They are not. (Except declare, which is colored in the playground, but not VSCode).
grafik
grafik

TS Playground: http://www.typescriptlang.org/play/?ts=3.8.0-dev.20191116#code/GYVwdgxgLglg9mABMOcAUAPAXIghmATwEodcBnMgUwCcozENEZ6AiXFxAbwChE-EA9AMQBaMeImSAeojBw8IKHAhwAtgAcANpSiVkcaojYUadFtwC+3bhE3l6AMVRde-ACaVbuanoBGuAC9SQgBuVz4hUTFZeVxFZTUtHT0UQxYPLx9zfkFhXwJEKAALPQB3XAIAGkRSkp8memLcKEQVVVVKMBaEQpLEahgAcyKWshgPAH5LIA

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