John Carlos Theme
Publisher: John CarlosThemes in package: 2
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 | #A0D07D | — |
| punctuation.definition.string, string | #FC6A5D | — |
| constant.numeric, keyword.other.unit, support.constant | #D0BF69 | — |
| constant.language, entity.name.tag, keyword, storage.modifier, storage.type, support.type.primitive, variable.language | #FF7AB2 | bold |
| keyword.control.directive, keyword.control.preprocessor, punctuation.definition.preprocessor | #FFA14F | — |
| markup.underline.link | #6699FF | — |
| entity.name.type.class.std.rust, storage.type.cs, support.type, meta.object-literal.key | #ACF2E4 | — |
| meta.object-literal.key | #72BFAE | — |
| punctuation.definition.variable, punctuation.support.type.property-name, storage.modifier.lifetime, support.type.property-name, variable.other.property | #83C9BC | — |
| meta.definition.function, meta.definition.method, meta.method.declaration | #5DD8FF | — |
| variable.other.constant, meta.definition.variable | #FFFFFF | — |
| variable.parameter, meta.parameters, meta.method.declaration, meta.object.member | #4eb1cc | — |
| variable.other.object, meta.var.expr, meta.definition.variable, meta.block | #4EB1CC | — |
| constant.language.boolean.false, constant.language.boolean.true, meta.objectliteral | #D6C455 | — |
| entity.name.type | #E5CFFF | — |
| entity.name.type.class, entity.other.inherited-class | #5DD8FF | — |
| keyword.operator | #A167E6 | — |
| meta.return.type, meta.function, support.type.primitive, meta.field.declaration, meta.interface | #D0A8FF | — |
| meta.function-call | #B281EB | — |
| entity.name.type.namespace, entity.name.variable, variable.other.assignment | #49B7D7 | — |
| variable.object.property, meta.definition.property, meta.field.declaration, meta.class | #49B7D7 | — |
| fenced_code.block.language, punctuation.definition.bold.markdown, punctuation.definition.heading.markdown, punctuation.definition.italic.markdown, punctuation.definition.list.begin.markdown, punctuation.definition.markdown, punctuation.definition.metadata.markdown, punctuation.definition.quote.begin.markdown, punctuation.definition.raw.markdown, punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown | #72BFAE | — |
| string.other.link.title.markdown | #DFDFE0 | — |
| entity.name.section | #DFDFE0 | bold |
| variable.other.object.property, support.variable.property, variable.other.constant.property | #83C9BC | — |
| markup.bold | #DFDFE0 | bold |
| markup.italic | #DFDFE0 | italic |
| punctuation | #DFDFE0 | — |
| punctuation.decorator, meta.brace.round | #FFFFFF | — |
| entity.other.attribute-name | #D0A8FF | — |
| meta.tag.without-attributes, metax.children | #FFFFFF | — |
| variable.other.readwrite.alias | #FFFFFF | — |
| punctuation.terminator.statement | #505050 | — |
| punctuation.accessor.optional | #A167E6 | — |
| case-clause.expr, switch-block.expr, switch-statement.expr | #41A1C0 | — |
| token.info-token | #6796E6 | — |
| token.warn-token | #CD9731 | — |
| token.error-token | #F44747 | — |
| token.debug-token | #B267E6 | — |
| support.class.dart, other.source.dart | #E5CFFF | — |
| entity.name.function.dart | #5DD8FF | — |
| source.dart | #49B7D7 | — |
| variable.parameter.dart | #83C9BC | — |
| entity.name.type.class.flutter, source.flutter | #E5CFFF | — |
| entity.name.function.flutter | #5DD8FF | — |
| source.flutter | #49B7D7 | — |
| variable.parameter.flutter | #83C9BC | — |
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}!`;
}