Calm Code
Publisher: kvvprofThemes in package: 2
Quiet, dark theme for VS Code focused on low visual noise and high readability.
Quiet, dark theme for VS Code focused on low visual noise and high readability.
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 |
|---|---|---|
| storage.modifier, keyword.declaration, keyword.other, keyword.control | #8899C9 | bold |
| entity.name.function, meta.function-call, support.function | #A7D8EE | — |
| variable.other, variable.other.readwrite, variable.other.object, variable.other.constant, meta.definition.variable variable.other, meta.variable.declaration variable.other, meta.variable.assignment variable.other | #E0DED2 | — |
| variable.language.this, variable.language.super, variable.language.self, keyword.operator.new, keyword.other.new, keyword.control.new, storage.type.new, entity.name.type.interface, entity.name.type.enum, entity.name.type, support.class, entity.name.function.decorator, storage.type.annotation, punctuation.definition.decorator, punctuation.definition.annotation, meta.annotation.identifier, meta.decorator variable.other.readwrite, meta.decorator entity.name.function, meta.function.decorator entity.name.function, meta.function.decorator.python entity.name.function | #B490AC | — |
| meta.type, meta.type.annotation, meta.type.declaration, meta.return.type, meta.type entity.name.type, meta.type.annotation entity.name.type, support.type, support.type.primitive, support.type.builtin, storage.type | #96BDBD | — |
| string, markup.inline.raw | #8AC88A | — |
| constant.numeric, constant.language, support.constant, constant.character, keyword.other.unit | #F78A6B | — |
| constant.language.boolean, constant.language.null, constant.language.undefined | #FF9E6B | — |
| keyword.control.import, keyword.control.export, keyword.control.from | #9FBAD0 | — |
| meta.object-literal.key, support.type.property-name, meta.structure.dictionary.json support.type.property-name.json, entity.name.tag.yaml, meta.key.yaml | #E0DED2 | — |
| source.js.jsx entity.other.attribute-name, source.jsx entity.other.attribute-name, source.tsx entity.other.attribute-name, meta.tag.jsx entity.other.attribute-name, meta.tag.tsx entity.other.attribute-name, meta.tag.attributes.jsx entity.other.attribute-name, meta.tag.attributes.tsx entity.other.attribute-name | #96BDBD | — |
| entity.name.tag, entity.name.tag.css, entity.other.attribute-name, entity.other.attribute-name.id.css, entity.other.attribute-name.class.css | #8899C9 | — |
| string.regexp, constant.character.escape, string.regexp.group, string.regexp.arbitrary-repetition | #6ACFF6 | — |
| invalid, invalid.deprecated | #FF8C8C | underline |
| comment, punctuation.definition.comment | #7A7B76 | — |
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}!`;
}