ecto-coder
Publisher: tinkertamperThemes in package: 1
contains 10% fruit juice
contains 10% fruit juice
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 |
|---|---|---|
| invalid | #F07171 | — |
| meta.embedded, source.groovy.embedded, meta.template.expression | #E6E6E6 | — |
| variable, punctuation.definition.variable, support.variable.property.dom, support.variable.dom, support.variable.property, punctuation.separator.parameter, string.interpolated.pug variable | #E6E6E6 | — |
| comment, punctuation.definition.comment | #6a7887 | — |
| string, punctuation.definition.string | #78BD65 | — |
| constant.character.escape | #399EE6 | — |
| keyword, constant.language.import-export-all | #FFCE6B | — |
| entity.name.type, support.type.primitive, support.type.builtin, meta.type.annotation entity.name.type, meta.type.parameters entity.name.type | #C8B6FF | — |
| keyword.control, keyword.operator, storage, support.type, keyword.operator.expression, keyword.operator.new | #399EE6 | — |
| entity.name.function, support.class, support.function, new.expr entity.name.type, entity.other.inherited-class | #7DBFEF | — |
| punctuation.definition.typeparameters, keyword.operator.type, keyword.operator.optional, punctuation.definition.template-expression, source.tsx punctuation.section.embedded, source.jsx punctuation.section.embedded | #F07171 | — |
| constant | #C8B6FF | — |
| constant.numeric, constant.language | #FA8D3E | — |
| variable.parameter, parameter.variable, meta.function.parameter variable, source.rust meta.type_params.rust | #FA8D3E | — |
| punctuation, meta.brace | #a6a6a6 | — |
| variable.language.this, variable.language.special.self | #399EE6 | — |
| comment.block.documentation entity.name.type | #F07171 | — |
| variable.language.super | #7DBFEF | — |
| meta.tag.metadata.doctype entity.name.tag, meta.tag.metadata.doctype punctuation.definition.tag, meta.tag.metadata.doctype string, meta.tag.metadata.doctype entity.other.attribute-name.html, meta.tag.sgml.doctype | #a6a6a6 | — |
| entity.name.tag | #399EE6 | — |
| meta.tag string | #78BD65 | — |
| meta.tag entity.other.attribute-name, entity.other.attribute-name.html | #FFCE6B | — |
| constant.character.entity, punctuation.definition.entity | #FA8D3E | — |
| entity.name.section.markdown, markup.heading.setext | #FFCE6B | — |
| punctuation.definition.list | #FFCE6B | — |
| meta.separator.markdown | #FFCE6B | — |
| markup.inline.raw | #399EE6 | — |
| markup.bold | — | bold |
| markup.italic | — | italic |
| meta.link punctuation.definition.string, meta.image punctuation.definition.string | #a6a6a6 | — |
| link, markup.underline.link, constant.other.reference.link.markdown | #7DBFEF | — |
| markup.quote | #FA8D3E | — |
| entity.name.tag.css, entity.name.tag.wildcard | #78BD65 | — |
| entity.other.attribute-name.class, entity.other.attribute-name punctuation.definition.entity | #FFCE6B | — |
| entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class, constant.other.color | #399EE6 | — |
| entity.other.attribute-name.id, entity.other.attribute-name.id punctuation.definition.entity | #7DBFEF | — |
| source.css constant.numeric, source.less constant.numeric, source.scss constant.numeric | #78BD65 | — |
| meta.property-name, support.type.property-name | #FA8D3E | — |
| meta.property-value, meta.property-value constant.other, support.constant.property-value | #7DBFEF | — |
| variable.parameter.url | #FA8D3E | — |
| punctuation.section.embedded.begin.php, punctuation.section.embedded.end.php | #FFCE6B | — |
| entity.name.section | #7DBFEF | — |
| support.type.property-name.json | #FFCE6B | — |
| markup.inserted | #78BD65 | — |
| markup.changed | #399EE6 | — |
| markup.deleted | #F07171 | — |
| meta.diff.header | #399EE6 | — |
| meta.diff.range | #399EE6 | — |
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}!`;
}