Xcode Midnight theme
Publisher: arc0reThemes in package: 1
Xcode Midnight theme
Xcode Midnight 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 | #51d05d | — |
| string | #fc484d | — |
| constant.numeric | #AE81FF | — |
| constant.language | #AE81FF | — |
| constant.character, constant.other | #ea905f | — |
| variable | #2cf898 | |
| keyword | #dc3ea4 | — |
| variable.other | — | |
| storage | #ffffff | |
| storage.type | #dc3ea4 | |
| entity.name.class | #A6E22E | |
| entity.other.inherited-class | #2cf898 | |
| entity.name.function | #2cf898 | |
| variable.parameter | #ffffff | |
| entity.name.tag | #52F9F9 | |
| entity.other.attribute-name | #A6E22E | |
| support.function | #2cf898 | |
| support.constant | #2cf898 | |
| support.type, support.class | #2cf898 | |
| support.other.variable | — | |
| invalid | #F8F8F0 | |
| invalid.deprecated | #F8F8F0 | — |
| string source | #FF8A8A | |
| string.quoted.single | #fc484d | — |
| constant.other | #0bb3fc | — |
| sublimelinter.gutter-mark | #FFFFFF | — |
| sublimelinter.mark.error | #D02000 | — |
| sublimelinter.mark.warning | #DDB700 | — |
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}!`;
}