cpptheme
Publisher: shyeyianThemes in package: 2
cpptheme
cpptheme
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 |
|---|---|---|
| constant.character.format, entity.name.operator, keyword.operator, keyword.operator.delete.array.bracket, keyword.operator.logical.python, keyword.operator.new.cpp, meta.brace, punctuation.accessor, punctuation.definition, punctuation.definition.list.begin.markdown, punctuation.parenthesis, punctuation.section, punctuation.separator, punctuation.terminator, punctuation.vararg-ellipses, storage.modifier.pointer, storage.modifier.reference | #ff0000 | |
| constant.character.escape, constant.other.placeholder, entity.name.operator.custom-literal, keyword.other.suffix.literal, punctuation.definition.string.begin, punctuation.definition.string.end, storage.type.string.python, string | #ff8000 | |
| keyword.control.catch, keyword.control.co_await, keyword.control.co_return, keyword.control.co_yield, keyword.control.flow, keyword.control.return, keyword.control.throw, keyword.control.try | #d0d000 | |
| constant.numeric, keyword.other.unit | #00a000 | |
| entity.name.function, entity.name.module, entity.name.namespace, entity.name.scope-resolution, entity.name.type, keyword.other.operator, storage.type, storage.type.template.argument, support.function, support.type.built-in, support.type.exception, support.type.property-name, support.type.python | #00a000 | bold |
| constant.language, entity.name.section, entity.name.function.preprocessor, keyword.control, keyword.operator.cast, keyword.operator.delete, keyword.operator.noexcept, keyword.operator.alignof, keyword.operator.sizeof, keyword.other, keyword.other.using, storage.modifier, storage.type.class, storage.type.decltype, storage.type.enum, storage.type.function, storage.type.modifier, storage.type.namespace, storage.type.struct, storage.type.template, storage.type.template.argument.class, variable.language.special, variable.language.this | #0080ff | bold |
| entity.other.attribute, keyword.other.export, keyword.other.import, keyword.other.module, entity.name.module, meta.preprocessor | #c000ff | |
| entity.name.label, variable.other.assignment, variable.other.enummember, variable.other.object, variable.other.property, variable.legacy.builtin.python, variable.parameter, source, support.variable | #000000 | |
| comment, punctuation.definition.comment, storage.type.class.doxygen.cpp | #7f7f7f |
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}!`;
}