Shipwreck Theme
Publisher: g00dThemes in package: 1
Dark Shipwreck theme
Dark Shipwreck theme
Full workbench mockup using this variant's colors and tokenColors.
Loading...
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #FFFFFF | — |
| comment | #75715E | — |
| string | #E6DB74 | |
| string.regexp | #FF8000 | |
| constant.numeric | #FF0080 | — |
| constant.language | #A6E22E | — |
| constant.character, constant.other | #B4F83A | — |
| variable | — | |
| keyword | #5CAAF6 | — |
| storage | #F92672 | |
| storage.type | #66D9EF | |
| entity.name.class | #A6E22E | underline |
| entity.name.function | #00FF80 | |
| variable.parameter | #FADC3F | |
| entity.name.tag | #66CCFF | |
| entity.other.attribute-name | #A6E22E | |
| support.function | #66D9EF | |
| support.function.any-method | #00FF80 | |
| support.constant | #66D9EF | |
| support.type, support.class | #66D9EF | |
| support.other.variable | — | |
| variable.other | #B3B3B3 | — |
| invalid | #F8F8F0 | |
| invalid.deprecated | #F8F8F0 | — |
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}!`;
}