typescript-vim
typescript-vim copied to clipboard
Highlight unique symbol type
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();
}