monokai-best Theme
Publisher: geraneThemes in package: 1
monokai-best Theme ported from the monokai-best TextMate Theme
monokai-best Theme ported from the monokai-best TextMate Theme
Full workbench mockup using this variant's colors and tokenColors.
Loading...
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #F8F8F2 | — |
| comment | #c2b889 | — |
| string | #ffff63 | — |
| constant.numeric | #f082ff | — |
| constant.language | #f082ff | — |
| constant.character, constant.other | #f082ff | — |
| variable | — | |
| keyword | #ff005e | — |
| storage | #ff005e | |
| storage.type | #41ffff | italic |
| entity.name.class | #dcff00 | underline |
| entity.other.inherited-class | #dcff00 | italic underline |
| entity.name.function | #dcff00 | bold |
| variable.parameter | #ffb800 | italic |
| entity.name.tag | #ff005e | |
| entity.other.attribute-name | #dcff00 | |
| support.function | #41ffff | |
| support.constant | #41ffff | |
| support.type, support.class | #41ffff | italic |
| support.other.variable | — | |
| invalid | #ffffff | |
| invalid.deprecated | #ffffff | — |
| meta.diff, meta.diff.header | #655c2d | — |
| markup.deleted | #ff005e | — |
| markup.inserted | #dcff00 | — |
| markup.changed | #ffff63 | — |
| constant.numeric.line-number.find-in-files - match | #000000 | — |
| entity.name.filename.find-in-files | #ffff63 | — |
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}!`;
}