Dark Cosmos Theme
Publisher: Nikita RevencoThemes in package: 1
Beautiful, colourful theme designed for readability
Beautiful, colourful theme designed for 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 |
|---|---|---|
| entity.name.function, support.function, keyword.operator, entity.name.type.class, storage.type.function.arrow, punctuation.accessor, punctuation.accessor.optional, keyword.control.at-rule.keyframes.css, keyword.control.at-rule.media.css, keyword.control.at-rule.import.css, keyword.control.at-rule.charset.css, keyword.control.at-rule.namespace.css, keyword.control.at-rule.page.css, keyword.control.at-rule.font-face.css, keyword.control.at-rule.supports.css, keyword.control.at-rule.document.css, keyword.control.at-rule.counter-style.css, keyword.control.at-rule.font-feature-values.css, keyword.control.at-rule.layer.css, keyword.control.at-rule.swash.css, keyword.control.at-rule.css, keyword.control.at-rule.styleset.css | — | bold |
| keyword.operator.new | — | |
| comment, punctuation.definition.comment, string.comment | #8b949e | — |
| constant.other.placeholder, constant.character | #ff7b72 | — |
| constant, entity.name.constant, variable.other.constant, variable.other.enummember, variable.language, entity | #79c0ff | — |
| variable.parameter.function, meta.jsx.children, meta.block, meta.tag.attributes, entity.name.constant, meta.object.member, meta.embedded.expression | #e6edf3 | — |
| entity.name.function, entity.other.attribute-name.id.css, entity.other.attribute-name.class.css | #d2a8ff | — |
| entity.name.tag, support.class.component | #7ee787 | — |
| keyword | #ff7b72 | — |
| storage, storage.type | #ff7b72 | — |
| support.type.property-name.css, meta.property-name.css, support.type.property-name.json | #ffffff | — |
| storage.type.js | #fff | underline |
| storage.modifier.package, storage.modifier.import, storage.type.java | #e6edf3 | — |
| string, string punctuation.section.embedded source | #a5d6ff | — |
| support | #79c0ff | — |
| meta.property-name | #79c0ff | — |
| variable, variable.other.readwrite | #ffa657 | — |
| variable.other | #e6edf3 | — |
| invalid.broken | #ffa198 | italic |
| invalid.deprecated | #ffa198 | italic |
| invalid.illegal | #ffa198 | italic |
| invalid.unimplemented | #ffa198 | italic |
| carriage-return | #f0f6fc | italic underline |
| message.error | #ffa198 | — |
| string variable | #79c0ff | — |
| source.regexp, string.regexp | #a5d6ff | — |
| string.regexp.character-class, string.regexp constant.character.escape, string.regexp source.ruby.embedded, string.regexp string.regexp.arbitrary-repitition | #a5d6ff | — |
| string.regexp constant.character.escape | #7ee787 | bold |
| support.constant | #79c0ff | — |
| support.variable | #79c0ff | — |
| punctuation.terminator, punctuation.separator.comma, punctuation.separator.dictionary.pair | #fff8 | — |
| meta.module-reference | #79c0ff | — |
| punctuation.definition.list.begin.markdown | #ffa657 | — |
| markup.heading, markup.heading entity.name | #79c0ff | bold |
| markup.quote | #7ee787 | — |
| markup.italic | #e6edf3 | italic |
| markup.bold | #e6edf3 | bold |
| markup.underline | — | underline |
| markup.strikethrough | — | strikethrough |
| markup.inline.raw | #79c0ff | — |
| markup.deleted, meta.diff.header.from-file, punctuation.definition.deleted | #ffa198 | — |
| punctuation.section.embedded | #ff7b72 | — |
| markup.inserted, meta.diff.header.to-file, punctuation.definition.inserted | #7ee787 | — |
| markup.changed, punctuation.definition.changed | #ffa657 | — |
| markup.ignored, markup.untracked | #161b22 | — |
| meta.diff.range | #d2a8ff | bold |
| meta.diff.header | #79c0ff | — |
| meta.separator | #79c0ff | bold |
| meta.output | #79c0ff | — |
| brackethighlighter.tag, brackethighlighter.curly, brackethighlighter.round, brackethighlighter.square, brackethighlighter.angle, brackethighlighter.quote | #8b949e | — |
| brackethighlighter.unmatched | #ffa198 | — |
| constant.other.reference.link, string.other.link | #a5d6ff | — |
| support.class.component.js.jsx | — | italic |
| keyword.generator.asterisk | — | italic bold |
| string.quoted.double, string.quoted.single, string.template, constant.numeric, constant.language, support.constant.property-value.css, meta.property-list.css, string.regexp, constant.other.character-class.regexp, meta.group.regexp | #fcffa5 | — |
| meta.brace.square.js.jsx | #ffffff | — |
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}!`;
}