Flat_Dark Theme
Publisher: geraneThemes in package: 1
Flat_Dark Theme ported from the FlatDark TextMate Theme
Flat_Dark Theme ported from the FlatDark TextMate Theme
Full workbench mockup using this variant's colors and tokenColors.
Loading...
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #B2B8C2 | — |
| comment | #52565E | italic |
| string | #17bc9c | — |
| constant.numeric | #a26bbe | — |
| constant.language | #a26bbe | — |
| constant.character, constant.other | #a36bbe | — |
| variable | #48a3df | |
| keyword | #2e8dcd | — |
| storage | #2e8dcd | |
| storage.type | #2e8dcd | — |
| entity.name.class | #17bc9c | — |
| entity.other.inherited-class | #17bc9c | — |
| entity.name.function | #17bc9c | — |
| variable.parameter | #792A9C | — |
| entity.name.tag | #49a3df | — |
| entity.other.attribute-name | #17bc9c | — |
| support.function | #49a3df | |
| support.constant | #49a3df | |
| support.type, support.class | #49a3df | — |
| support.other.variable | #b1b8c1 | bold |
| invalid | #b1b8c1 | bold |
| invalid.deprecated | #B2B8C2 | bold |
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}!`;
}