CheYHinSpark Theme
Publisher: CheYHinSparkThemes in package: 9
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 |
|---|---|---|
| markup.bold | #FDB975 | bold |
| markup.italic | #FDB975 | italic |
| markup.strikethrough | — | strikethrough |
| markup.underline | — | underline |
| markup.inserted | #20A820 | — |
| markup.deleted | #A82020 | — |
| markup.changed | #2020A8 | — |
| invalid | #FC3030 | — |
| comment, punctuation.definition.comment | #949494 | italic |
| meta.preprocessor, keyword.operator, punctuation.accessor, punctuation.definition, punctuation.math, punctuation.other, punctuation.section, punctuation.separator, punctuation.terminator, storage.type.function.arrow | #E0E0E0 | — |
| constant.character, constant.language, constant.numeric, constant.other, punctuation.definition.bold, punctuation.separator.pointer-access | #FAC832 | — |
| punctuation.definition.string, string, punctuation.definition.quote | #C8FA32 | — |
| entity.name.section, markup.heading, heading, punctuation.definition.heading | #64FA32 | bold |
| constant.other.caps, entity.name.namespace, entity.name.scope-resolution, entity.name.type, keyword.declaration, keyword.struct | #50C828 | — |
| entity.name.tag, entity.name.variable.event | #28C8A0 | — |
| constant.character.math, entity.name.variable, entity.other.attribute-name, markup.inline, meta.attribute, meta.function-call.arguments, meta.member, meta.object.member, meta.property-value, punctuation.definition.constant.math, storage.modifier.import, support.class.math, support.type.property-name, variable | #32C8FA | — |
| entity.name.variable.parameter, meta.parameter.initialization, variable.parameter | #7A9AFA | italic |
| constant.other.general.math, entity.name.function, keyword.operator.sizeof, meta.function-call.generic, support.function | #9A7AFA | — |
| keyword.control, keyword.operator.delete, keyword.operator.expression.new, keyword.operator.new, keyword.other, keyword.other.type, keyword.type, punctuation.definition.directive, storage.modifier, storage.type.modifier, storage.type | #FA7A9A | — |
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}!`;
}