W0lfTheme
Publisher: Alex W0lfThemes 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 |
|---|---|---|
| comment, punctuation.definition.comment | #7f8184 | italic |
| meta.type.flowtype.js variable.other.flowtype.js | #d4d4d4 | — |
| keyword, storage.type.js, storage.type.function.js, variable.other.flowtype.js, storage.type.extends.js, storage.type.function.js, storage.type.class.js | #7f8184 | — |
| variable.function.js, meta.class meta.group.braces.curly meta.function-call variable.function.js, entity.name.tag.jsx, variable.function.constructor.js | #f7e1aa | — |
| entity.name.function.js, meta.class.js entity.name.class, meta.class meta.function-call variable.function.js, source.js keyword.control.loop.js, storage.type.function.arrow.js | #f1a5ab | — |
| keyword.control.flow.js, keyword.control.trycatch.js, source.js meta.group.braces.curly.js keyword.control.loop.js, keyword.control.switch.js | #f1a5ab | — |
| keyword.operator.assignment | #f7e1aa | — |
| keyword.operator.logical.js | #f7e1aa | — |
| keyword.operator.comparison.js, keyword.operator.relational.js | #f1a5ab | — |
| string.quoted, string.interpolated | #a9cfa4 | — |
| constant.language, constant.numeric, support.constant, constant.character, constant.other.color, constant.other.symbol, constant.other.key, keyword.other.unit | #91c5d3 | — |
| markup.inserted | #99C794 | — |
| markup.deleted | #E15A60 | — |
| markup.changed | #BB80B3 | — |
| *url*, *link*, *uri* | — | underline |
| constant.numeric.line-number.find-in-files - match | #AB7967 | — |
| entity.name.filename.find-in-files | #99C794 | — |
| token.info-token | #6796e6 | — |
| token.warn-token | #cd9731 | — |
| token.error-token | #f44747 | — |
| token.debug-token | #b267e6 | — |
| source.js entity.other.attribute-name.js | — | italic |
| entity.name.function.php.blade, entity.other.attribute-name.html | #99C794 | — |
| entity.name.function.php, entity.name.type.class.php | #f7e1aa | — |
| punctuation.definition.tag.begin.html, punctuation.definition.tag.end.html, punctuation.definition.tag.begin.html, punctuation.separator.key-value.html, punctuation.definition.string.begin.html, punctuation.definition.string.end.html, punctuation.terminator.expression.php | #9da5b4 | — |
| keyword.blade, variable.other.php, begin.bracket.round.blade.php, end.bracket.round.blade.php | #91C5D3 | — |
| string.quoted.double.html, keyword.operator.logical.php | #D4D4D4 | — |
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}!`;
}