Cozy Theme
Publisher: dalelarroderrThemes in package: 1
A warm, cozy dark theme for VS Code that's easy on the eyes during long coding sessions.
A warm, cozy dark theme for VS Code that's easy on the eyes during 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 | #5c5550 | italic |
| string, string.quoted, string.template | #c49a8a | — |
| constant.numeric, constant.language.boolean | #d4a055 | — |
| constant.language, constant.character, constant.other | #d4a055 | — |
| keyword, keyword.control, keyword.operator.new, keyword.operator.expression, keyword.operator.logical, storage.type, storage.modifier | #c491cf | — |
| entity.name.function, support.function, meta.function-call | #82b8cc | — |
| entity.name.type, entity.name.class, support.type, support.class | #e8a87c | — |
| variable, variable.other, variable.parameter | #d4c5b9 | — |
| meta.object-literal.key, variable.other.object.property | #82b8cc | — |
| variable.other.property, support.variable.property | #c9b8aa | — |
| entity.name.tag, punctuation.definition.tag | #e8a87c | — |
| support.class.component | #d480b8 | — |
| entity.other.attribute-name | #82b8cc | italic |
| punctuation, punctuation.separator, punctuation.terminator, meta.brace | #8a8078 | — |
| keyword.operator, keyword.operator.assignment, keyword.operator.arithmetic, keyword.operator.comparison | #8a8078 | — |
| string.regexp | #6fbcb0 | — |
| constant.character.escape, string.template punctuation.definition | #6fbcb0 | — |
| entity.other.inherited-class | #e8a87c | italic |
| support.module, entity.name.module | #d4a055 | — |
| meta.decorator, punctuation.decorator | #e8a87c | — |
| entity.name.namespace, entity.name.scope-resolution | #e8a87c | — |
| markup.heading, markup.heading entity.name, punctuation.definition.heading | #7ca8cf | bold |
| markup.bold | #e8a87c | bold |
| markup.italic | #c491cf | italic |
| markup.inline.raw, markup.fenced_code | #c49a8a | — |
| markup.underline.link | #7ca8cf | underline |
| markup.quote | #6fbcb0 | italic |
| markup.deleted | #c47070 | — |
| markup.inserted | #a3b88c | — |
| markup.changed | #d4a055 | — |
| markup.list | #e8a87c | — |
| source.json support.type.property-name, support.type.property-name.json | #7ca8cf | — |
| source.css support.type.property-name, source.css entity.name.tag | #7ca8cf | — |
| source.css support.constant, source.css constant.other.color | #d4a055 | — |
| source.css entity.other.attribute-name.class | #e8a87c | — |
| source.css entity.other.attribute-name.id | #d4a055 | — |
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}!`;
}