Codefolk
Publisher: kuranaiThemes in package: 2
A warm, modern light and dark color theme for Visual Studio Code.
A warm, modern light and dark color theme for Visual Studio Code.
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, source | #CDD3DE | — |
| comment, punctuation.definition.comment | #4CAE4C | |
| comment.line.double-slash, comment.line.double-slash punctuation.definition.comment | #5C7E8C | — |
| string, string.quoted, string.template, punctuation.definition.string | #C3E88D | — |
| constant.numeric, constant.language, constant.character, constant.other | #F77669 | — |
| keyword | #C792EA | — |
| storage, storage.type, storage.modifier | #C792EA | — |
| keyword.operator | #39ADB5 | — |
| punctuation.separator, punctuation.accessor, punctuation.definition.parameters, punctuation.definition.array | #D9F5DD | — |
| entity.name.function, support.function, meta.function-call, variable.function | #89DDFF | — |
| entity.name.type, entity.name.class, entity.name.interface, support.type, support.class | #FFCB6B | — |
| meta.type.annotation, meta.type.declaration, entity.name.type.alias, entity.name.type.interface | #1290BF | — |
| variable, variable.other.readwrite | #FF5370 | — |
| variable.parameter | #FD8B19 | — |
| variable.other.property, support.type.property-name, meta.object-literal.key | #FEDD6E | — |
| variable.language, variable.language.this, variable.language.super | #FFCB6B | — |
| entity.name.tag | #FF5370 | — |
| punctuation.definition.tag | #80CBC4 | — |
| support.class.component.tsx, support.class.component.jsx | #EE7278 | — |
| entity.other.attribute-name, support.type.property-name.css | #FFCB6B | — |
| support.constant.property-value, constant.other.color, support.constant.font-name | #C3E88D | — |
| support.type.property-name.json, string.json support.type.property-name.json | #FEDD6E | — |
| markup.heading, entity.name.section.markdown | #78CCF0 | |
| markup.bold | #CDD3DE | bold |
| markup.italic | #C792EA | italic |
| markup.underline.link, string.other.link, meta.link.inline.markdown | #FF5370 | — |
| markup.inline.raw, markup.fenced_code.block | #F1E655 | — |
| markup.inserted | #F1E655 | — |
| markup.deleted | #FF5370 | — |
| markup.changed | #C792EA | — |
| constant.other.symbol.elixir, constant.other.symbol.ruby | #C3E88D | — |
| entity.name.type.module.elixir, support.class.elixir | #FFCB6B | — |
| entity.name.tag.heex, support.class.component.heex, entity.name.tag.html | #FF5370 | — |
| invalid, invalid.illegal | #FF5370 | — |
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}!`;
}