Clean C++ Syntax
Publisher: HolyBlackCatThemes in package: 1
An alternative no-nonsense C++ syntax
An alternative no-nonsense C++ syntax
Full workbench mockup using this variant's colors and tokenColors.
Loading...
Workbench UI color keys from the theme JSON colors map.
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| invalid.illegal | #ff3769 | — |
| comment, comment.block, punctuation.definition.comment | #419741 | |
| comment.documentation, comment.line.documentation, comment.block.documentation | #d84e87 | — |
| meta.preprocessor, keyword.operator.preprocessor, keyword.other.preprocessor, comment.block.preprocessor | #df217a | — |
| string.quoted.double.include.system, string.quoted.double.quote.include.system | #4403be | — |
| string.quoted.double.include.user, string.quoted.double.quote.include.user | #276d0b | — |
| meta.preprocessor.pragma_value | #0062bd | — |
| meta.preprocessor.error_value | #464646 | — |
| constant.language.macro | #a55d00 | — |
| punctuation.preprocessor | #a55d00 | — |
| keyword.operator.word.preprocessor | #ce2216 | — |
| meta.preprocessor.line | #000000 | — |
| meta.preprocessor.macro_name | #8f0043 | — |
| keyword.other.preprocessor.unknown, keyword.other.preprocessor.hash.unknown | #9e24ce | — |
| keyword.operator | #000000 | — |
| keyword.operator.word | #ff00c8 | — |
| support.type, storage.type, keyword, storage | #0050c7 | — |
| storage.type.category | #97281c | — |
| keyword.other.context | #db0054 | — |
| meta.attribute.region | #640046 | — |
| storage.modifier.attrib | #ff25be | — |
| constant.language, support.constant, variable.language | #b40797 | — |
| constant.numeric, constant | #058516 | — |
| string.quoted.single | #008f99 | — |
| string, string.quoted | #c41f1f | — |
| string.quoted.triple | #464646 | — |
| string.quoted.triple.delim | #d16b17 | — |
| constant.character.escape | #002981 | — |
| invalid.illegal.escape | #ff00ff | — |
| constant.other.suffix | #d35005 | — |
export interface User {
id: string;
name: string;
role: "admin" | "member";
tags: string[];
}
/**
* Fetch user data by ID
* @param id
* @returns User object or null if ID is invalid
*/
export async function fetchUser(id: string): Promise<User | null> {
if (!id) {
return null;
}
const response = await fetch(`/api/users/${id}`, {
method: "GET",
headers: { Accept: "application/json" },
});
if (!response.ok) {
throw new Error(`HTTP ${response.status}`);
}
return (await response.json()) as User;
}
function greet(user: User): string {
// Simple greeting function that uses the user's name
return `Hello, ${user.name}!`;
}