Ruwer's Theme
Publisher: LeoruwerThemes in package: 1
VSCode theme created by: Leoruwer
VSCode theme created by: Leoruwer
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 |
|---|---|---|
| comment | #556B2F | — |
| string, string.quoted.single.php, string.quoted.double.php, string.quoted.single.html, string.quoted.double.html, string.quoted.single.js, string.quoted.double.js | #54a0a5 | — |
| constant.numeric | #c581ffff | — |
| constant.language | #c581ffff | — |
| constant.character, constant.other | #c581ffff | — |
| variable | #ffa400ff | |
| keyword | #ff0068ff | — |
| storage | #ff0068ff | |
| storage.type | #94a4ff | italic |
| entity.name.class | #bfff00ff | underline |
| entity.other.inherited-class | #bfff00ff | italic underline |
| entity.name.function | #bcdb5d | |
| variable.parameter | #ffa200ff | italic |
| entity.name.tag | #ff0068ff | |
| entity.other.attribute-name | #bfff00ff | |
| support.function | #4dffffff | |
| support.constant | #4dffffff | |
| support.type, support.class | #4dffffff | italic |
| support.other.variable | #ffff19ff | |
| invalid | #ffffffff | |
| invalid.deprecated | #ffffffff | — |
| meta.function-call, support.function.name, meta.function-call punctuation.definition.parameters, meta.function-call variable.function, meta.function-call entity.name.function.js, support.function.source.rust, meta.function-call meta.function-call.generic, support.function.any-method | #ffeb3b | italic |
| punctuation.section.embedded | #6573C3 | bold |
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}!`;
}