Type-R
Publisher: ryan-parmanThemes in package: 1
A Monokai derivative theme.
A Monokai derivative theme.
Full workbench mockup using this variant's colors and tokenColors.
Workbench UI color keys from the theme JSON colors map.
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #FFFFFF | — |
| text | #FFFFFF | — |
| source | #FFFFFF | — |
| comment | #939393 | |
| constant |
TypeScript sample highlighted with this variant's colors and tokenColors.
| — |
| keyword | #FFFF00 | bold |
| other.preprocessor.c | #D0D0FF |
| entity.name.preprocessor | — |
| entity.name.function, support.function, entity | — |
| variable.parameter | — | italic |
| entity.name.import | #00FF80 |
| source comment.block | #939393 |
| string | #00FF80 | — |
| string constant.character.escape | #AAAAAA | — |
| string.interpolated | #FFFFFF | — |
| string.regexp | #CCCC33 | — |
| string.literal | #CCCC33 | — |
| string.interpolated constant.character.escape | #555555 | — |
| entity.name.type, entity.other.inherited-class, support.class | #FFFFFF | bold underline |
| entity.other.inherited-class | — | italic underline |
| entity.name.tag | — | underline |
| entity.other.attribute-name | — |
| support.function | #00FFFF |
| variable, support.variable | #FFFFFF |
| storage.type, support.type | #FFFFFF |
| meta.diff, meta.diff.header | #009933 | — |
| markup.deleted | #DD5555 | — |
| markup.inserted | #3333FF | — |
| markup.changed | #E6DB74 | — |
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}!`;
}