CoddingTheme
Publisher: bob7446Themes in package: 1
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 |
|---|---|---|
| text.html.markdown constant, string.other.link.title.markdown, string.other.link.description.markdown, string.other.link.description.title.markdown, constant.other.reference.link.markdown, meta.embedded.line.ruby, variable.parameter.function.ruby, keyword.operator.pipe.shell | #95A1AB | — |
| comment, punctuation.definition.markdown, punctuation.definition.quote.begin.markdown, fenced_code.block.language.markdown, meta.separator.markdown | #95A1AB56 | — |
| comment storage | #ba8adeb0 | — |
| comment entity.name.type | #D1BC71b0 | — |
| comment variable | #DB676Bb0 | — |
| comment punctuation.definition.block | #5CA3D6B0 | — |
| keyword, storage, storage.type.class.js, string.regexp, meta.var.expr.js storage.type.js, entity.other.attribute-name.pseudo-element.css, punctuation.definition.link.title.begin.markdown, punctuation.definition.link.title.end.markdown, punctuation.definition.link.description.begin.markdown, punctuation.definition.link.description.end.markdown, string.regexp keyword.other, keyword.control.anchor.regexp, keyword.operator.c, meta.template.call.cpp keyword.operator.cpp, meta.parens.objcpp keyword.operator.objcpp | #B47CD6 | — |
| variable.language.super, entity.name.function, storage.type.function.arrow, entity.other.attribute-name.id.css, punctuation.definition.heading.markdown, meta.class.js storage.type.js, meta.function-call.generic.python, punctuation.section.embedded.begin.php, punctuation.section.embedded.end.php, meta.require.ruby, keyword.other.special-method.ruby, support.function.kernel.ruby, support.function.builtin.shell, meta.brace.round, punctuation.definition.parameters.begin, punctuation.definition.parameters.end, punctuation.definition.block, meta.parameter.object-binding-pattern.js, support.function.misc.css, support.function.gradient.css, punctuation.section.function.begin.bracket.round.css, punctuation.section.function.end.bracket.round.css, punctuation.section.function.css | #5CA3D6 | — |
| keyword.operator.spread, keyword.operator.increment, keyword.operator.decrement, keyword.operator.increment-decrement, meta.brace.square, keyword.operator.arithmetic, keyword.operator.assignment, constant.character.escape, punctuation.accessor, punctuation.separator, punctuation.terminator.statement, support.type.property-name.css, support.type.property-name.json, keyword.operator.class.php, keyword.operator.objcpp, keyword.operator.optional.ts, keyword.operator.type.annotation.ts, entity.other.attribute-name.pseudo-element.css punctuation.definition.entity.css, keyword.other.unit.css, keyword.other.unit.px.css, punctuation.terminator.rule.css, support.constant.gradient.css, support.constant.property-value.css, punctuation.section.property-list.begin.bracket.curly.css, punctuation.section.property-list.end.bracket.curly.css, keyword.operator.stylus, meta.selector.stylus, punctuation.definition.dictionary.begin.json, punctuation.definition.dictionary.end.json, punctuation.definition.array.begin.json, punctuation.definition.array.end.json, punctuation.definition.tag.begin.html, punctuation.definition.tag.end.html, punctuation.definition.tag.begin.js, punctuation.definition.tag.end.js | #86ABBF | — |
| variable.language.this, keyword.operator.new, keyword.other.new | #E04A63 | — |
| variable, entity.name.tag, constant.other.character-class.regexp, meta.function.c, entity.name.variable.field.cs, entity.name.variable.local.cs, keyword.operator.rest.ts | #E06670 | — |
| constant.numeric, punctuation.definition.raw.markdown, punctuation.definition.italic.markdown, punctuation.definition.bold.markdown, punctuation.definition.italic.markdown punctuation.definition.bold.markdown, constant.other.color.rgb-value.hex.css, source.css, source.stylus | #EA8465 | — |
| string, punctuation.definition.string.markdown, punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown | #71BB73 | — |
| constant.language, variable.other.constant, variable.language.arguments, variable.other.object.property, support.variable.property, entity.name.type, entity.other.attribute-name.html, entity.other.attribute-name.js, entity.other.inherited-class, entity.other.attribute-name.class.css, support.class.component, support.type.object.module, punctuation.definition.metadata.markdown, punctuation.definition.constant.markdown, punctuation.definition.constant.begin.markdown, punctuation.definition.constant.end.markdown, keyword.operator.quantifier.regexp, constant.character.numeric.regexp, punctuation.definition.character-class.regexp, constant.other.character-class.set.regexp, entity.name.scope-resolution.function.call, entity.name.scope-resolution.function.definition, storage.modifier.import.java, storage.type.java, storage.type.object.array.java, entity.name.variable.parameter.cs, support.class.ruby, variable.other.readwrite.ts, support.type.primitive.ts, support.type.builtin.ts, meta.import variable, variable.stylus | #BDA864 | — |
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}!`;
}