Oceanic Horizon Theme
Publisher: CodeLabsThemes in package: 1
A calming, ocean-inspired dark theme that reduces eye strain and enhances readability
A calming, ocean-inspired dark theme that reduces eye strain and enhances readability
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 |
|---|---|---|
| comment, punctuation.definition.comment | #627694 | italic |
| variable, string constant.other.placeholder, entity.name.variable, variable.parameter, variable.other.constant | #D8E0FB | — |
| keyword, keyword.control, keyword.operator, keyword.other.special-method, keyword.other.unit, storage.type.function, storage.type.class, storage.type | #56C2EA | — |
| keyword.operator | #56C2EA | — |
| punctuation.definition.string, punctuation.definition.variable, punctuation.definition.parameters, punctuation.definition.array, punctuation.section, meta.brace | #D8E0FB | — |
| entity.name.function, meta.function-call, variable.function, support.function, keyword.other.special-method | #C4A7FF | — |
| entity.name.type, entity.other.inherited-class, support.class, entity.name.class | #FFCC66 | — |
| string, punctuation.definition.string | #7DE3B3 | — |
| constant.language, support.constant, constant.character, constant.escape | #FFCC66 | — |
| constant.numeric | #FFCC66 | — |
| constant.language.boolean | #FFCC66 | — |
| support.type, support.class, support.other.namespace.use.php, meta.use.php, support.other.namespace.php, markup.raw.textblock.documentation.php, storage.type.php | #FFCC66 | — |
| entity.name, meta.entity | #FFCC66 | — |
| entity.name.tag, meta.tag.sgml, markup.deleted.git_gutter | #56C2EA | — |
| entity.other.attribute-name | #C4A7FF | — |
| variable.language | #56C2EA | italic |
| markup.heading, markup.heading entity.name, markup.heading.markdown punctuation.definition.heading.markdown | #56C2EA | bold |
| markup.italic, markup.italic punctuation.definition.italic.markdown | #D8E0FB | italic |
| markup.bold, markup.bold punctuation.definition.bold.markdown | #D8E0FB | bold |
| markup.underline.link | #56C2EA | — |
| markup.inline.raw, markup.raw.block | #7DE3B3 | — |
| markup.quote | #7DE3B3 | italic |
| markup.list punctuation.definition.list | #56C2EA | — |
| invalid, invalid.illegal | #F97583 | — |
| invalid.deprecated | #F97583 | strikethrough |
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}!`;
}