Rebecca Theme
Publisher: geraneThemes in package: 1
Rebecca Theme ported from the Rebecca TextMate Theme
Rebecca Theme ported from the Rebecca TextMate Theme
Full workbench mockup using this variant's colors and tokenColors.
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #000000 | — |
| comment | #9f9f9fff | bold underline italic |
| string | #f006e0 | — |
| constant.numeric | #0022ffff | — |
| constant.language |
TypeScript sample highlighted with this variant's colors and tokenColors.
| bold |
| constant.character, constant.other | #0022ffff | — |
| variable | #5b6dd4ff | italic |
| keyword | #7100f5 | bold |
| storage | #d300d1ff | — |
| storage.type | #1f8d5d | italic |
| entity.name.class | #fc0000ff | underline |
| entity.other.inherited-class | #fc0000ff | italic underline |
| entity.name.function | #0000ffff | italic |
| variable.parameter | #358100ff | italic |
| entity.name.tag | #ff00ffff |
| entity.other.attribute-name | #8c4600ff |
| support.function | #0f9f30 | — |
| support.constant | #1f7a53 | — |
| support.type, support.class | #039532 | italic |
| support.other.variable | #ffffffff | — |
| invalid | #ffffffff |
| invalid.deprecated | #ffffffff | — |
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}!`;
}
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}!`;
}