Space Kraken
Publisher: chanwareThemes in package: 1
A dark cosmic theme with syntax highlighting optimized for OLED displays and extended coding sessions.
A dark cosmic theme with syntax highlighting optimized for OLED displays and extended coding sessions.
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 | #4d6470 | italic |
| variable, string constant.other.placeholder | #cdd3de | — |
| variable.other.local | #cdd3de | — |
| variable.parameter | #fb9551 | — |
| variable.other.property, variable.other.object.property | #97a0b4 | — |
| variable.other.global | #e4c16c | — |
| invalid, invalid.illegal | #ff5370 | — |
| keyword, storage.type, storage.modifier | #dca9dc | — |
| keyword.control | #dca9dc | italic |
| punctuation, keyword.operator, meta.tag, punctuation.definition.tag, punctuation.separator.inheritance.php, punctuation.definition.tag.html, punctuation.definition.tag.begin.html, punctuation.definition.tag.end.html, punctuation.section.embedded, keyword.other.template, keyword.other.substitution | #66c7c7 | — |
| punctuation.separator.comma | #89ddff | — |
| punctuation.accessor | #89ddff | — |
| punctuation.terminator | #60b3b3 | — |
| punctuation.section.braces, punctuation.section.brackets, punctuation.section.parens | #66c7c7 | — |
| entity.name.tag, meta.tag.sgml, markup.deleted.git_gutter | #f36e77 | — |
| entity.name.function, meta.function-call, variable.function, support.function | #85c3f4 | — |
| entity.name.method | #85c3f4 | — |
| entity.name.function.static | #85c3f4 | italic |
| constant.numeric, constant.language, support.constant, constant.character, constant.escape, keyword.other.unit, keyword.other | #fb9551 | — |
| string, constant.other.symbol, constant.other.key, markup.heading, markup.inserted.git_gutter | #99c794 | — |
| constant.character.escape | #85c3f4 | — |
| entity.name.class, entity.name.type, support.type, support.class | #e4c16c | — |
| entity.name.type.class.abstract | #80cbc4 | — |
| entity.name.type.interface | #99c794 | italic |
| entity.name.type.parameter | #80cbc4 | italic |
| entity.other.attribute-name, entity.name.function.decorator | #dca9dc | italic |
| text.html.basic entity.other.attribute-name.html, text.html.basic entity.other.attribute-name | #dca9dc | italic |
| entity.other.attribute-name.class | #dca9dc | bold |
| support.type.property-name | #e4c16c | — |
| support.constant.property-value | #fb9551 | — |
| markup.inserted | #99c794 | — |
| markup.deleted | #f36e77 | — |
| markup.changed | #c792ea | — |
| string.regexp | #f36e77 | — |
| support.type.property-name.json | #dca9dc | — |
| markup.heading | #80cbc4 | bold |
| markup.inline.raw | #c792ea | — |
| markup.bold | #f36e77 | bold |
| markup.italic | #f36e77 | italic |
| markup.underline.link | #82aaff | — |
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}!`;
}