UNI Syntax Theme
Publisher: Corrado CanepariThemes in package: 1
A dark and colorful syntax theme
A dark and colorful syntax theme
Full workbench mockup using this variant's colors and tokenColors.
Loading...
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #e3e3e3 | — |
| comment | #a3a3a3 | italic |
| keyword.operator.class, keyword.operator, constant.other, source.php.embedded.line | #FFFFFF | |
| variable, constant, support.other.variable, string.other.link, string.regexp, entity.name.tag, entity.other.attribute-name, meta.tag, declaration.tag, | #CC244F | italic |
| constant.numeric, constant.language, support.constant, constant.character, variable.parameter, punctuation.section.embedded, keyword.other.unit | #FF5D04 | |
| entity.name.class, entity.name.type, support.type, support.class, meta.function-call | #FFC90E | italic |
| keyword.operator, constant.other.color | #EFCA00 | |
| string, constant.other.symbol, entity.other.inherited-class, markup.heading | #23CA4A | |
| entity.name.function, support.function, keyword.other.special-method, meta.block-level | #569BFF | |
| #A46CDF | ||
| invalid | #e3e3e3 | |
| meta.separator | #FFFFFF | — |
| invalid.deprecated | #FFFFFF | |
| markup.inserted.diff, meta.diff.header.to-file | #718c00 | — |
| markup.deleted.diff, meta.diff.header.from-file | #c82829 | — |
| meta.diff.header.from-file, meta.diff.header.to-file | #FFFFFF | — |
| meta.diff.range | #3e999f | italic |
| markup.quote | #FFC58F | — |
| markup.list | #BBDAFF | — |
| markup.bold, markup.italic | #FFC58F | — |
| markup.inline.raw | #FF9DA4 |
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}!`;
}