Gruber Ocean
Publisher: ruscitoThemes in package: 1
A dark minimal theme based on Gruber Darker with ocean blue functions. Keywords yellow, strings green, types gray, functions blue.
A dark minimal theme based on Gruber Darker with ocean blue functions. Keywords yellow, strings green, types gray, functions blue.
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 | #d78700 | — |
| string, string.quoted, string.template | #afd75f | — |
| keyword, keyword.control, keyword.operator.new, keyword.operator.expression, keyword.operator.logical, storage.type, storage.modifier | #ffd700 | — |
| storage.type.class, storage.type.struct, storage.type.enum, storage.type.interface, storage.type.type | #ffd700 | — |
| entity.name.function, meta.function-call, support.function, meta.function-call entity.name.function | #87afd7 | — |
| entity.name.type, support.type, support.class, entity.name.class, entity.other.inherited-class | #767676 | — |
| constant.numeric, constant.language, constant.character | #eeeeee | — |
| variable, variable.other, variable.parameter | #eeeeee | — |
| keyword.operator, keyword.operator.assignment, keyword.operator.arithmetic, keyword.operator.comparison | #eeeeee | — |
| meta.preprocessor, keyword.control.directive, keyword.control.import, keyword.control.from, keyword.other.import | #bcbcbc | — |
| punctuation, meta.brace, punctuation.definition.tag | #eeeeee | — |
| entity.name.tag | #ffd700 | — |
| entity.other.attribute-name | #eeeeee | — |
| entity.other.attribute-name.class.css, entity.other.attribute-name.id.css | #87afd7 | — |
| entity.name.tag.css | #ffd700 | — |
| heading.1.markdown, heading.2.markdown, heading.3.markdown, heading.4.markdown, heading.5.markdown, heading.6.markdown, markup.heading, punctuation.definition.heading.markdown | #ffd700 | bold |
| markup.inline.raw.string.markdown, markup.fenced_code.block.markdown | #afd75f | — |
| markup.underline.link.markdown, string.other.link.title.markdown | #87afd7 | — |
| markup.bold | #eeeeee | bold |
| markup.italic | #eeeeee | italic |
| meta.decorator, entity.name.function.decorator, punctuation.definition.decorator | #767676 | — |
| constant.character.escape | #ffd700 | — |
| storage.modifier.lifetime.rust, entity.name.function.macro.rust, entity.name.type.macro.rust | #767676 | — |
| invalid, invalid.illegal | #ff5f5f | bold |
| keyword.todo, comment storage.type | #ffd700 | bold |
| markup.inserted | #afd75f | — |
| markup.deleted | #ff5f5f | — |
| markup.changed | #ffd700 | — |
| support.type.property-name.json | #87afd7 | — |
| entity.name.tag.yaml | #87afd7 | — |
| keyword.key.toml, support.type.property-name.toml | #87afd7 | — |
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}!`;
}