Amp Theme
Publisher: Hanna RoseThemes in package: 2
An editor theme highly based on the website for Amp
An editor theme highly based on the website for Amp
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 | #8A8A8A | italic |
| comment.block.documentation, comment.line.documentation | #727272 | italic |
| string, string.quoted, string.template | #5A8F8F | — |
| string.regexp, string.quoted.regexp | #5A8F8F | — |
| constant.character.escape, constant.other.character-class.escape | #7C9B96 | — |
| string.other.link | #5A8F8F | — |
| constant.numeric, constant.language | #C87A2F | — |
| constant.language.boolean | #D9634F | — |
| constant.other.symbol | #C87A2F | — |
| keyword, keyword.control, keyword.operator.new, keyword.operator.expression, keyword.operator.logical, storage.type, storage.modifier | #D9634F | — |
| keyword.operator, keyword.operator.assignment, keyword.operator.arithmetic, keyword.operator.comparison | #D9634F | — |
| variable, variable.other, variable.language | #2A2A2A | — |
| entity.name.function, support.function, meta.function-call.generic | #316E99 | — |
| entity.name.class, entity.name.type, support.type, support.class | #B8932F | — |
| entity.other.inherited-class | #B8932F | — |
| entity.name.constructor | #316E99 | — |
| entity.other.attribute-name | #C87A2F | — |
| entity.name.tag, meta.tag | #D9634F | — |
| punctuation.definition.tag | #5A5A5A | — |
| punctuation, punctuation.separator, punctuation.terminator | #5A5A5A | — |
| punctuation.section.embedded | #D9634F | — |
| meta.brace, punctuation.section, punctuation.definition.block | #5A5A5A | — |
| punctuation.definition.list.begin | #D9634F | — |
| markup.heading, entity.name.section | #D9634F | bold |
| markup.bold | — | bold |
| markup.italic | — | italic |
| markup.underline.link | #316E99 | italic |
| markup.inline.raw, markup.fenced_code | #5A8F8F | — |
| meta.preprocessor, entity.name.function.preprocessor | #D9634F | — |
| entity.name.label | #D9634F | — |
| support.constant, constant.other | #D9634F | — |
| entity.name.enum | #C87A2F | — |
| variable.other.enummember | #C87A2F | — |
| invalid | #D9634F | — |
| invalid.deprecated | #E3A25A | — |
| markup.inserted | #5A8F8F | — |
| markup.deleted | #D9634F | — |
| markup.changed | #E3A25A | — |
| text.html.markdown meta.link.inline | #5A8F8F | — |
| meta.diff.header | #627987 | — |
| source.diff.added | #5A8F8F | — |
| source.diff.deleted | #D9634F | — |
| meta.embedded, source.groovy.embedded | #2A2A2A | — |
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}!`;
}