Cereal Theme
Publisher: David KangThemes in package: 2
A simple light/dark theme
A simple light/dark theme
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 | #67899e | — |
| variable, namespace, entity.name.namespace | #dbd9cc | — |
| keyword, entity | #fea740 | |
| constant, string | #c6c9df | — |
| constant.character.escape, constant.language.boolean, constant.language.true, constant.language.false | #fea740 | |
| storage, keyword.control.import, punctuation.definition.directive, keyword.control.directive | #ec4585 | |
| keyword.control, keyword.control.flow.python | #f3cb17 | |
| keyword.control.flow, keyword.control.return, keyword.control.break, keyword.control.throw, keyword.operator.new, keyword.operator.delete | #56a6e7 | |
| keyword.operator.assignment | #bab0c5 | bold |
| keyword.operator, punctuation.accessor, punctuation.separator.period, punctuation.separator.pointer-access, punctuation.separator.dot-access, keyword.operator.assignment.compound, storage.modifier.pointer, storage.modifier.reference, storage.type.function.arrow | #eb51ff | bold |
| keyword.operator.ternary, keyword.operator.logical, keyword.operator.comparison, keyword.operator.bitwise, keyword.operator.and, keyword.operator.or, keyword.operator.not, keyword.operator.relational | #f3cb17 | bold |
| variable.function, entity.name.function | #e6e1db | bold |
| punctuation.section.block, meta.tag, constant.other.symbol, constant.other.key, constant.other.color, punctuation.definition.tag, punctuation.definition.block, punctuation.definition.dictionary, punctuation.separator.inheritance, keyword.other.template, keyword.other.substitution, keyword.operator.type.annotation, markup.raw.block | #9291aa | |
| invalid, message.error, punctuation.definition.deleted, markup.deleted | #FF5370 | bold underline |
| meta.brace.round, constant.character.format.placeholder, punctuation.separator, punctuation.terminator, punctuation.section, punctuation.definition.list.begin.python, punctuation.definition.list.end.python, meta.brace.square, punctuation.definition.string | #bab0c5 | — |
| punctuation.definition.parameters, punctuation.definition.arguments, punctuation.section.arguments, punctuation.section.parameters, punctuation.definition.parameters.begin.ts, punctuation.definition.parameters.end.ts | #d6d6c6 | bold |
| markup.underline.link | #56a6e7 | |
| string.other.link.description, string.other.link.title | #f3cb17 | |
| markup.bold | #e6e1db | bold |
| markup.heading, markup.heading entity.name | #ec4585 | bold |
| markup.italic | — | italic |
| punctuation.definition.list | #f3cb17 | |
| markup.quote | #67899e | — |
| markup.raw.block | #67899e | — |
| markup.other | #618b31 | — |
| meta.separator, punctuation.definition.bold, punctuation.definition.italic, punctuation.definition.metadata, punctuation.definition.array, punctuation.support.type | #9291aa | — |
| support.type.property-name | #e2e0d5 | — |
| constant.language.json | #f3cb17 | — |
| entity.name.tag | #ec4585 | — |
| entity.other.attribute-name | #fea740 | — |
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}!`;
}