Syro
Publisher: evanlThemes in package: 1
Minimal theme based off One Dark
Minimal theme based off One Dark
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 |
|---|---|---|
| support.constant, variable.other.constant, entity.other.attribute-name.id, constant.language.boolean, constant.language.json.comments | #56B6C2 | |
| support.class.builtin, constant.language.null, keyword.operator.logical, keyword.other.important, keyword.control.at-rule | #C678DD | |
| keyword.control, keyword.operator.new, storage.type.function, storage.type | #C678DD | italic |
| support.class.component, support.constant.property-value, entity.name.function, support.function.misc, constant.character.escape, punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end | #61AFEF | |
| constant.numeric, keyword.other.unit, constant.other.color.rgb-value, entity.other.attribute-name.class | #D19A66 | |
| entity.other.attribute-name, variable.language.this | #E5C07B | |
| variable.other.object | #E5C07B | italic |
| string.quoted, punctuation.definition.string, string.template, meta.attribute-selector | #98C379 | |
| meta.object-literal.key, variable.other.object.property, constant.language.import-export-all, entity.name.tag, support.type.property-name.json, support.variable.property, meta.definition.variable, variable | #e06c75 | |
| meta.brace, punctuation.section.function.scss, punctuation.definition.attribute-selector, punctuation.section.embedded, source, support.type.property-name, punctuation.definition.tag, keyword.operator, punctuation.separator | #adb1ba | |
| comment.block.documentation, punctuation.definition.comment, comment.line, comment.block, meta.path | #5a5e66 | italic |
| markup.italic | — | italic |
| heading.2 | — | bold |
| markup.bold | — | bold |
| storage.type.function.arrow | — |
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}!`;
}