Calmforge Theme
Publisher: JiashuThemes in package: 1
This theme is specifically designed to modify other themes to add syntax highlighting support for Rust.
This theme is specifically designed to modify other themes to add syntax highlighting support for Rust.
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 | #9893a5 | italic |
| constant | #286983 | — |
| constant.numeric, constant.language | #d7827e | — |
| entity.name | #d7827e | — |
| entity.name.section, entity.name.tag, entity.name.namespace, entity.name.type | #56949f | — |
| entity.other.attribute-name, entity.other.inherited-class | #907aa9 | italic |
| invalid | #b4637a | — |
| invalid.deprecated | #797593 | — |
| keyword, variable.language.this | #286983 | — |
| markup.inserted.diff | #56949f | — |
| markup.deleted.diff | #b4637a | — |
| markup.heading | — | bold |
| markup.bold.markdown | — | bold |
| markup.italic.markdown | — | italic |
| meta.diff.range | #907aa9 | — |
| meta.tag, meta.brace | #575279 | — |
| meta.import, meta.export | #286983 | — |
| meta.directive.vue | #907aa9 | italic |
| meta.property-name.css | #56949f | — |
| meta.property-value.css | #ea9d34 | — |
| meta.tag.other.html | #797593 | — |
| punctuation | #797593 | — |
| punctuation.accessor | #286983 | — |
| punctuation.definition.string | #ea9d34 | — |
| punctuation.definition.tag | #9893a5 | — |
| storage.type, storage.modifier | #286983 | — |
| string | #ea9d34 | — |
| support | #56949f | — |
| support.constant | #ea9d34 | — |
| support.function | #b4637a | italic |
| variable | #d7827e | italic |
| variable.other, variable.language, variable.function, variable.argument | #575279 | — |
| variable.parameter | #907aa9 | — |
| variable.language.self.rust | #d8704b | — |
| variable.language.super.rust | #d8704b | — |
| entity.name.function.rust | #b4637a | — |
| entity.name.function.macro.rust | #6d578d | 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}!`;
}