Aozora
Publisher: Jennifer OngThemes in package: 1
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 |
|---|---|---|
| entity.name.namespace | #518aa1 | — |
| token, meta.property-list | #98A6BF | — |
| comment, puncutuation.definition.comment, puncutuation.definition.comment.json, comment.line.double-slash | #3e4a5f | italic |
| string, punctuation.definition.string, string.regexp punctuation.definition.string, meta.attribute-selector | #10a4e9 | — |
| constant.numeric, keyword.other.unit, keyword.operator.quantifier | #3e9ddd | bold |
| entity.name.scope-resolution | #2f8273 | — |
| meta.structure | #7fb5e0 | — |
| punctuation.separator.pointer-access | #2f8273 | — |
| source variable, source support.variable | #4f7aa1 | — |
| variable.other.property, variable.other.object.property | #556bce | — |
| property, support.type.property-name, meta.object-literal.key, meta.type.tuple, entity.name.label, variable.object.property | #556bce | — |
| support.variable.property | #556bce | — |
| keyword.operator, punctuation.separator.pointer | #5dabd8 | — |
| variable.parameter | #0d74b9 | — |
| keyword.control, keyword.control punctuation, keyword.other | #517bd6 | bold |
| entity.name.function, storage.type.class.jsdoc, meta.decorator variable, punctuation.decorator, punctuation.definition.block.tag.jsdoc, keyword.command, entity.name.function.definition.cpp | #008bad | — |
| support.function | #187e7e | |
| source variable.other.constant | #549ad6 | — |
| constant.language, support.type.primitive, support.type.builtin | #0086ff | — |
| support.constant.property-value | #0086ff | — |
| constant.character, constant.other | #0086ff | — |
| punctuation.support.type.property-name, meta.object-literal.key punctuation.definition.string | #465e9e | — |
| support.type.vendored.property-name | #537acc | — |
| variable.other.jsdoc | #657dbf | — |
| meta.object-literal.key | #657dbf | — |
| variable.other.enummember | #657dbf | — |
| entity.other.attribute-name | #657dbf | — |
| entity.other.attribute-name.class | #5c79ff | — |
| entity.other.attribute-name.class punctuation | #5c79ff | — |
| entity.other.attribute-name.id, entity.other.attribute-name.id punctuation | #3d8bff | — |
| entity.name.label | #3d8bff | — |
| punctuation.separator.label | #2a6ac9 | — |
| keyword.other.important | #309eb3 | — |
| storage, storage.type, keyword.operator.new | #389dc5 | bold |
| variable.language.this | #549ad6 | — |
| variable.language.super | #549ad6 | — |
| entity.name.tag.reference | #52708b | — |
| entity.name.class, entity.name.type, entity.other.inherited-class, support.class.builtin | #3caaae | bold |
| source.css | #495c80 | — |
| entity.name.tag | #5eb593 | — |
| entity.name.type.module | #2f8273 | — |
| entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-element punctuation | #2f8273 | — |
| keyword.operator.expression | #1d93ab | |
| entity.other.attribute-name.pseudo-class, entity.other.attribute-name.pseudo-class punctuation | #207698 | — |
| meta.at-rule.keyframes entity.other.attribute-name | #207698 | — |
| support.constant | #52708b | |
| invalid | #f8f8f0 | |
| invalid.deprecated | #f8f8f0 | — |
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}!`;
}