pizarra
Publisher: Alejandro FernándezThemes in package: 1
A dark, calm color theme
A dark, calm color 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 | #ffffff3f | — |
| string | #9CDD2D | — |
| string constant.character.escape | #C3F470 | italic |
| punctuation.definition.template-expression, punctuation.section.embedded | #C3F470 | — |
| meta.template.expression, source meta.embedded | #ebeced | — |
| string.regexp | #93E0C5 | — |
| constant.numeric, constant.language | #E469A7 | — |
| variable.language.this, variable.language.self, variable.language.special.self, variable.parameter.function.language.special.self | #fabada | — |
| keyword, storage.type, storage.modifier, punctuation.separator.annotation | #EE8C30 | — |
| meta.definition entity.name, meta.class entity.name.type, meta.enum.declaration entity.name.type, meta.interface entity.name.type, meta.class.ruby entity.name, meta.module.ruby entity.name, meta.function.method entity.name, meta.class.python entity.name, meta.function.python entity.name, meta.at-rule.function support.function, meta.at-rule.mixin entity.name, support.function.name entity.name | #EED130 | — |
| support.type, meta.type.annotation, meta.return.type, meta.type entity.name.type, meta.return.type entity.name.type, meta.return.type support.type, meta.type.parameters entity.name.type, meta.type.parameters punctuation.definition, support.type.python, comment.typehint.type, comment.typehint.punctuation | #FFEC81 | — |
| entity.other.inherited-class, meta.class entity.name.type.module, meta.class punctuation.accessor | #93E0C5 | italic |
| meta.function.decorator entity.name.function, meta.function.decorator punctuation.definition, meta.decorator entity.name.function, meta.decorator punctuation.decorator, meta.decorator meta.brace | #93E0C5 | — |
| entity.name.tag, punctuation.definition.tag | #90C8DA | — |
| entity.other.attribute-name, meta.tag.attributes keyword.operator.assignment, meta.tag.attributes punctuation.section.embedded | #C1E4F0 | — |
| support.type.property-name | #C1E4F0 | — |
| support.type.vendored.property-name | #C1E4F0 | italic |
| support.constant.property-value, support.constant.color, constant.other.color, support.constant.font-name, meta.property-value support.function, meta.at-rule.include entity.name.function, meta.at-rule.extend entity.other.attribute-name.placeholder | #FFEC81 | — |
| entity.other.attribute-name.id | #FF7F75 | — |
| entity.other.attribute-name.class | #93E0C5 | — |
| meta.attribute-selector, meta.attribute-selector keyword | #C1E4F0 | — |
| keyword.other.important | #EF3E30 | — |
| entity.other.attribute-name.placeholder | #EED130 | — |
| meta.property-list entity.name.tag.reference | #FABADA | — |
| markup.heading | #ffffff | bold |
| markup.bold | #ffffff | bold |
| markup.italic | #ffffff | italic |
| markup.raw, markup.inline.raw | #ffffff | — |
| markup.fenced_code punctuation.definition | #ffffff | — |
| comment storage.type | #FF7F75 | — |
| comment entity.name.type | #FFEC81 | — |
| comment variable.other | #ebeced | — |
| comment keyword.codetag.notation, comment storage.type.class.todo, comment storage.type.class.fixme, comment storage.type.class.changed, comment storage.type.class.xxx, comment storage.type.class.idea, comment storage.type.class.hack, comment storage.type.class.note, comment storage.type.class.review, comment storage.type.class.nb, comment storage.type.class.bug, comment storage.type.class.question, comment storage.type.class.combak, comment storage.type.class.temp, comment storage.type.class.debug, comment storage.type.class.optimize | #407CA5 | 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}!`;
}