ChidoCode
Publisher: Alan Christian Ramirez RodriguezThemes in package: 4
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, comment.documentation | #BCAAA4 | italic |
| keyword, storage.type, storage.modifier, keyword.control.js, keyword.operator.js | #F06292 | bold |
| string, string.quoted, string.template, string.quoted.double.html, string.quoted.single.html | #FFB300 | — |
| variable, identifier, meta.definition.variable.name, variable.other.readwrite.js, variable.other.js, variable.other, variable.parameter, variable.language | #00ACC1 | — |
| entity.name.function, support.function, meta.function-call.js, meta.function.js | #1E88E5 | — |
| entity.name.class, entity.name.type.class, entity.name.type.interface, entity.other.attribute-name.class.css | #8E24AA | — |
| entity.name.tag, meta.tag | #F06292 | — |
| entity.other.attribute-name, entity.other.attribute-name.html, entity.other.attribute-name.id.css | #43A047 | — |
| support.type.property-name.css, support.property-name | #1E88E5 | — |
| support.constant.property-value.css, constant.other.color.rgb-value.css, constant.other.color.hex.css | #FFB300 | — |
| constant, constant.language, constant.character, constant.other, constant.numeric, constant.language.boolean, constant.language.null, constant.numeric.js | #8E24AA | — |
| keyword.operator, keyword.other | #F06292 | — |
| punctuation, meta.brace.round, meta.brace.square, meta.brace.curly, punctuation.separator.comma, punctuation.definition.parameters.begin, punctuation.definition.parameters.end, punctuation.definition.tag, punctuation.separator.key-value | #8E24AA | — |
| invalid, invalid.deprecated | #FFFFFF | bold |
| storage.type.annotation, meta.annotation | #F06292 | — |
| entity.name.namespace, entity.name.module | #1E88E5 | — |
| entity.name.enum, support.type.enum | #FFB300 | — |
| entity.name.type.parameter | #1E88E5 | — |
| entity.name.function.macro | #00ACC1 | — |
| meta.preprocessor | #F06292 | — |
| markup.heading | #F06292 | bold |
| markup.link | #1E88E5 | underline |
| markup.quote | #8E24AA | italic |
| markup.list | #FFB300 | — |
| meta.diff, meta.diff.header, meta.diff.header.from, meta.diff.header.to | #F06292 | bold |
| meta.diff.line | #2C2C2C | — |
| meta.separator | #BCAAA4 | — |
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}!`;
}