Calm Coder Themes
Publisher: Sumit PalThemes in package: 4
Four easy-on-the-eyes VS Code themes — Candy, Dark Candy, Light, and Dark — built for long coding sessions.
Four easy-on-the-eyes VS Code themes — Candy, Dark Candy, Light, and Dark — built for long coding sessions.
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, punctuation.definition.comment | #9ca3af | italic |
| keyword, keyword.control, keyword.operator.new, storage.type, storage.modifier | #1A6EAE | bold |
| string, string.template, string.quoted | #16a34a | — |
| constant.character.escape, string.regexp | #06b6d4 | — |
| constant.numeric | #ea580c | — |
| constant.language.boolean, constant.language.null, constant.language.undefined | #7c3aed | — |
| variable, variable.other | #1f2937 | — |
| variable.parameter | #4b5563 | italic |
| entity.name.function, meta.function-call, support.function | #1A6EAE | — |
| entity.name.class, entity.name.type, support.class | #7c3aed | — |
| entity.name.type.interface | #0891b2 | italic |
| variable.other.property, support.type.property-name, meta.object-literal.key | #374151 | — |
| keyword.operator | #4b5563 | — |
| punctuation | #9ca3af | — |
| entity.name.tag | #dc2626 | — |
| entity.other.attribute-name | #7c3aed | — |
| support.type.property-name.css | #374151 | — |
| entity.other.attribute-name.class.css, entity.other.attribute-name.id.css | #dc2626 | — |
| support.type.property-name.json | #1A6EAE | — |
| markup.heading | #1A6EAE | bold |
| markup.underline.link | #2563eb | — |
| meta.decorator, entity.name.function.decorator | #d97706 | italic |
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}!`;
}