typescript-vim icon indicating copy to clipboard operation
typescript-vim copied to clipboard

Highlight unique symbol type

Open rhysd opened this issue 6 years ago • 0 comments

unique symbol type was added to TypeScript at v2.7. This PR adds highlight for it.

https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-7.html#unique-symbol

// Works
declare const Foo: unique symbol;

// Error! 'Bar' isn't a constant.
let Bar: unique symbol = Symbol();

// Works - refers to a unique symbol, but its identity is tied to 'Foo'.
let Baz: typeof Foo = Foo;

// Also works.
class C {
    static readonly StaticSymbol: unique symbol = Symbol();
}

rhysd avatar Jul 13 '19 18:07 rhysd