Derby
Publisher: Sean ClaytonThemes in package: 1
A neat dark theme.
A neat dark theme.
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 | #7F7F7F | 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 | #7F7F7F | — |
| variable.function.js, meta.class meta.group.braces.curly meta.function-call variable.function.js, entity.name.tag.jsx, variable.function.constructor.js, variable.other.anonymous.elixir | #ffe2a9 | — |
| 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, entity.name.function.elixir, constant.language.elixir, variable.other.anonymous.elixir | #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 | #ffe2a9 | — |
| keyword.operator.logical.js, keyword.operator.logical.elixir | #ffe2a9 | — |
| keyword.operator.comparison.js, keyword.operator.relational.js, keyword.operator.comparison.elixir | #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, constant.language.elixir, constant.other.symbol.elixir, variable.language.elixir | #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 |
| text.html.basic entity.other.attribute-name.html | — | italic |
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}!`;
}