extensions/html-language-features/server/src/modes/javascriptSemanticTokens.ts/classifySymbol
function classifySymbol(symbol: ts.Symbol) {
	const flags = symbol.getFlags();
	if (flags & ts.SymbolFlags.Class) {
		return TokenType.class;
	} else if (flags & ts.SymbolFlags.Enum) {
		return TokenType.enum;
	} else if (flags & ts.SymbolFlags.TypeAlias) {
		return TokenType.type;
	} else if (flags & ts.SymbolFlags.Type) {
		if (flags & ts.SymbolFlags.Interface) {
			return TokenType.interface;
		} if (flags & ts.SymbolFlags.TypeParameter) {
			return TokenType.typeParameter;
		}
	}
	const decl = symbol.valueDeclaration || symbol.declarations && symbol.declarations[0];
	return decl && tokenFromDeclarationMapping[decl.kind];
}