Modgrammer Theme
Publisher: sh4nksThemes in package: 1
A modified brogrammer theme using vibrant colors.
A modified brogrammer theme using vibrant colors.
Full workbench mockup using this variant's colors and tokenColors.
Loading...
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #f5f5f5 | — |
| comment | #616161 | italic |
| markup.inserted | #2ecc71 | — |
| markup.deleted | #e74c3c | — |
| markup.changed | #6c71c4 | — |
| markup.ignored | #222222 | — |
| constant, support.constant | #e51c23 | — |
| entity | #5677fc | — |
| entity.other.attribute-name.pseudo-element | #f1c40f | — |
| entity.name.tag | #e51c23 | — |
| invalid | #070500 | bold |
| keyword | #9c27b0 | — |
| storage | #9c27b0 | — |
| string | #259b24 | — |
| string.regexp | #3498db | — |
| support | #00bcd4 | — |
| variable | #ffc107 | — |
| punctuation.definition.annotation.python | #9c27b0 | — |
| markup.quote.markdown | #f1c40f | — |
| markup.heading | #3498db | — |
| markup.italic | #2ecc71 | italic |
| markup.bold | #2ecc71 | bold |
| markup.raw | #e74c3c | — |
| markup.list | #f1c40f | — |
| markup.deleted.git_gutter | #F92672 | — |
| markup.inserted.git_gutter | #A6E22E | — |
| markup.changed.git_gutter | #967EFB | — |
| markup.ignored.git_gutter | #565656 | — |
| markup.untracked.git_gutter | #565656 | — |
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}!`;
}