Fresh Dark
Publisher: Fresh DarkThemes 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 | #65737E | — |
| keyword, storage.type, storage.modifier | #566d4b | — |
| keyword.operator, constant.other.color, punctuation, meta.tag, punctuation.definition.tag, punctuation.separator.inheritance.php, punctuation.definition.tag.html, punctuation.definition.tag.begin.html, punctuation.definition.tag.end.html, punctuation.section.embedded, keyword.other.template, keyword.other.substitution | #5FB3B3 | — |
| entity.name.tag, meta.tag.sgml, markup.deleted.git_gutter | #FA939F | — |
| entity.name.function | #67a2bc | — |
| support.other.variable, string.other.link | #F2777A | — |
| meta.function-call, variable.function, support.function, keyword.other.special-method, meta.block-level | #d4d4d4 | — |
| support.other.variable, string.other.link | #F2777A | — |
| constant.numeric, constant.language, support.constant, constant.character, keyword.other.unit | #9cc086 | — |
| variable.parameter | #BCD5FF | — |
| storage.type.function.arrow | #5FB3B3 | — |
| string, constant.other.symbol, constant.other.key, markup.heading, markup.inserted.git_gutter, meta.group.braces.curly constant.other.object.key.js string.unquoted.label.js | #99C794 | — |
| meta.class, entity.name.class, entity.name.type.class, entity.other.inherited-class, meta.field.declaration | #ad767c | — |
| support.type, support.class, support.other.namespace.use.php, meta.use.php, support.other.namespace.php, markup.changed.git_gutter | #FA939F | — |
| support.class | #ad767c | — |
| entity.name.module.js, variable.import.parameter.js, variable.other.class.js | #FA939F | — |
| variable.language | #607a52 | italic |
| entity.name.method.js | #D8DEE9 | — |
| meta.class-method.js entity.name.function.js, variable.function.constructor | #D8DEE9 | — |
| entity.other.attribute-name | #C5A6C4 | — |
| markup.inserted | #99C794 | — |
| markup.deleted | #FA939F | — |
| markup.changed | #C5A6C4 | — |
| string.regexp, meta.group.regexp, string.regexp punctuation.definition.string.begin.js, string.regexp punctuation.definition.string.end.js | #FA939F | — |
| constant.character.escape | #5FB3B3 | — |
| meta.brace.round, meta.object-literal.key, meta.brace.square | #607a52 | — |
| variable, support.variable, support.variable.dom, support.variable.property, support.variable.property.dom | #CDD3DE | — |
| *url*, *link*, *uri* | — | underline |
| constant.numeric.line-number.find-in-files - match | #AB7967 | — |
| entity.name.filename.find-in-files | #99C794 | — |
| tag.decorator.js entity.name.tag.js, tag.decorator.js punctuation.definition.tag.js | #6699CC | italic |
| source.js constant.other.object.key.js string.unquoted.label.js | #FA939F | italic |
| token.info-token | #6796E6 | — |
| token.warn-token | #CD9731 | — |
| token.error-token | #F44747 | — |
| token.debug-token | #B267E6 | — |
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}!`;
}