tretton37 Theme
Publisher: crustanThemes in package: 1
tretton37 theme for VS Code
tretton37 theme for VS Code
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 | #4f565f | italic |
| meta.parameters comment.block | #4f565f | italic |
| string | #d0e6da | — |
| constant.numeric | #d0e6da | — |
| constant.language | #80c565 | — |
| constant.character, constant.other, variable.other.constant | #d0e6da | — |
| variable, support.other.variable | #d0e6da | |
| keyword | #80c565 | — |
| storage | #80c565 | |
| storage.type | #80c565 | italic |
| entity.name.class | #e9f6f6 | underline |
| entity.name.type,support.type | #d0e6da | |
| entity.other.inherited-class | #80c565 | italic underline |
| entity.name.function | #d0e6da | |
| variable.parameter | #678097 | italic |
| entity.name.tag,entity.other.attribute-name.class,entity.other.attribute-name.id | #80c565 | |
| entity.other.attribute-name | #678097 | |
| support.function | #d0e6da | |
| support.constant | #d0e6da | |
| support.class | #80c565 | — |
| support.other.variable | — | |
| invalid | #F8F8F0 | |
| invalid.deprecated | #F8F8F0 | — |
| meta.brace,punctuation | #4f565f | — |
| comment.block.c | #4f565f | italic |
| meta.property-name,support.type.property-name | #678097 | — |
| meta.property-value | #678097 | — |
| meta.object-literal.key | #678097 | — |
| variable.other.readwrite.alias | #d0e6da | — |
| variable.language.this,support.variable.object,support.variable.dom | #678097 | — |
| token.info-token | #6796e6 | — |
| token.warn-token | #cd9731 | — |
| token.error-token | #f44747 | — |
| token.debug-token | #b267e6 | — |
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}!`;
}