afoalb theme
Publisher: afoalb-themeThemes in package: 1
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 |
|---|---|---|
| function | #ff0000 | — |
| type | #ff0000 | — |
| markup.underline | — | underline |
| markup.bold | #99B5E5 | bold |
| punctuation.definition.heading.markdown | #99B5E5 | — |
| entity.name.section.markdown | #99B5E5 | — |
| markup.underline.link.markdown | #99B5E5 | bold |
| markup.italic | — | italic |
| markup.strikethrough | — | strikethrough |
| markup.inserted | #B5CEA8 | — |
| markup.deleted | #CE9178 | — |
| markup.changed | #4B76D2 | — |
| punctuation.definition.list.begin.markdown | #4B76D2 | — |
| comment, punctuation.definition.comment | #6a6a74 | — |
| string | #ADAEB3 | — |
| punctuation.definition, punctuation.section, punctuation.terminator, meta.brace, meta.fstring.python | #ADAEB3 | — |
| emphasis | — | italic |
| strong | — | bold |
| string.quoted, punctiation.definition.string.begin, punctiation.definition.string.end, string.template, string.regexp.quoted | #9AB57B | — |
| constant.numeric | #CD9B6E | — |
| keyword | #99B5E5 | — |
| keyword.operator | #65AAB9 | — |
| keyword.control, keyword.operator.new | #C287CC | — |
| variable, constant | #CD9B6E | — |
| storage | #C287CC | — |
| variable.other.readwrite, source.python, variable.parameter | #AEB5C2 | — |
| variable.other.object, entity.name.type | #a5a2ff | — |
| support.variable | #e87f7f | — |
| variable.language.this, meta.object-literal.key, | #AEB5C2 | — |
| entity | #62A7E3 | — |
| meta.function.decorator.python, punctuation.definition.decorator | #62A7E3 | — |
| support.function.magic | #62A7E3 | — |
| invalid | #df2626 | — |
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}!`;
}