Material/Monokai Theme
Publisher: Bobby ZrncevThemes in package: 1
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 |
|---|---|---|
| — | #B1BFC2 | — |
| comment | #696d75 | — |
| string | #eeca4e | — |
| constant.numeric | #a6a9ee | — |
| constant.language | #a6a9ee | — |
| constant.character, constant.other | #a6a9ee | — |
| variable | — | |
| keyword | #F92672 | — |
| storage | #F92672 | |
| storage.type | #6dcee0 | italic |
| entity.name.class | #eeca4e | underline |
| entity.other.inherited-class | #a4c817 | italic underline |
| entity.name.function | #a3d53e | |
| variable.parameter | #ee7f17 | italic |
| entity.name.tag | #F92672 | |
| entity.other.attribute-name | #a3d53e | |
| support.function | #7acacb | |
| support.constant | #7acacb | |
| support.type, support.class | #7acacb | italic |
| support.other.variable | — | |
| invalid | #e8e8e1 | |
| invalid.deprecated | #e8e8e1 | — |
| meta.diff, meta.diff.header | #75715E | — |
| markup.deleted | #F92672 | — |
| markup.inserted | #A6E22E | — |
| markup.changed | #E6DB74 | — |
TypeScript sample highlighted with this variant's colors and tokenColors.
Loading...
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}!`;
}