B9F36BCF530F3D6B5C9CF39D2E260A99 (Theme)
Publisher: Shahab KhalvatiThemes in package: 2
Theme / edition: minimal semantic
Theme / edition: minimal semantic
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 | #F1F227 | — |
| variable.other.readwrite | #FF4500 | — |
| keyword, storage.type, storage.modifier | #ABB7B7 | — |
| keyword.control.flow, keyword.control.module, meta.function storage.type.function, keyword.control.export | #FC6399 | — |
| keyword.control.switch, keyword.control.conditional, keyword.operator.ternary, keyword.operator.logical, keyword.operator.comparison | #FF7F50 | — |
| keyword.operator.ternary | #ABB7B7 | — |
| meta.import string.quoted, meta.import string.quoted punctuation, meta.import keyword.control.as, keyword.control.module.reference | #A9A9A9 | — |
| variable.other.readwrite.alias | #E8E8E8 | — |
| string, string punctuation, constant.numeric, constant.language, constant.character, constant.escape, keyword.other.unit, keyword.other | #AEA8D3 | — |
| variable.other.constant.property, meta.object.member variable.other.constant, variable.other.constant | #E4F1FE | — |
| meta.function entity.name.function, storage.type.function.arrow, meta.definition.function entity.name.function, meta.function punctuation.definition meta.brace, meta.function meta.brace.curly, meta.arrow meta.parameters punctuation.definition.parameters.begin, meta.arrow meta.parameters punctuation.definition.parameters.end | #81CFE0 | — |
| variable.parameter, meta.function.parameters, meta.function.parameters variable.other.readwrite, meta.function.parameters keyword.operator.spread, meta.jsx meta.tag meta.embedded.expression meta.arrow meta.parameters, meta.jsx meta.tag meta.embedded.expression meta.arrow meta.parameters punctuation | #D2D7D3 | — |
| meta.function-call entity.name.function, meta.function-call.with-arguments variable.other.readwrite, meta.function-call.with-arguments entity.name.function | #BEBEBE | — |
| variable.other.readwrite, variable.other.object, meta.method-call.with-arguments variable.other.readwrite | #F4B350 | — |
| meta.type.declaration keyword.operator.assignment, meta.type punctuation, meta.type.annotation, meta.type meta.brace, meta.return.type.arrow keyword.operator, keyword.operator.type | #28A228 | |
| meta.type storage.type, keyword.control.as, keyword.operator.expression.keyof, meta.field.declaration keyword.operator.optional, meta.type.declaration meta.object.type keyword.operator.optional | #2ECC32 | italic |
| support.type.primitive, support.type.builtin, meta.type.annotation support.type.builtin, meta.type.annotation meta.type.function, meta.type.annotation meta.type.function punctuation.definition, meta.type.declaration string | #65A665 | italic |
| meta.interface meta.field.declaration meta.definition.property entity, meta.type.annotation meta.field.declaration meta.definition.property variable, meta.type.annotation meta.field.declaration meta.definition.property entity, meta.type.annotation meta.field.declaration meta.definition.property, meta.type.declaration meta.object.type meta.definition.property variable, meta.type.declaration meta.object.type meta.indexer.declaration variable, meta.type.declaration variable.other.property, meta.object.flowtype variable.other.readwrite | #8BB82D | italic |
| variable.language.this | #66CC99 | — |
| meta.class meta.method.declaration meta.definition.method entity.name.function, meta.class meta.method.declaration meta.parameters punctuation, meta.class meta.field.declaration meta.definition.property entity, meta.class meta.field.declaration meta.definition.property variable, variable.other.class | #00D46A | — |
| meta.object-literal.key, meta.object-literal.key meta.brace, meta.object-literal.key constant.numeric.decimal, meta.object-literal.key string.quoted, meta.object-literal.key string.quoted punctuation.definition.string, meta.objectliteral punctuation.definition.block, meta.block meta.objectliteral punctuation.definition.block, constant.other.object string | #B381B3 | — |
| support.type.property-name, support.type.property-name punctuation | #ABB7B7 | — |
| source.json support.type.property-name, source.json support.type.property-name punctuation | #D2D7D3 | — |
| source.json string, source.json constant.language | #BE90D4 | — |
| meta.structure.dictionary | #808080 | — |
| meta.tag entity.name.tag support.class.component | #8BB82D | — |
| meta.tag entity.other.attribute-name | #AAA789 | — |
| meta.tag.attributes keyword.operator.assignment, meta.tag.attributes punctuation.section.embedded | #696969 | — |
| text.html.markdown, text.html.markdown punctuation.definition.list | #D2D7D3 | — |
| text.html.markdown heading | #E8E8E8 | — |
| text.html.markdown markup.bold.markdown | — | bold |
| text.html.markdown markup.italic.markdown | — | italic |
| text.html.markdown markup.inline.raw, text.html.markdown markup.fenced_code | #A9A9A9 | — |
| text.html.markdown punctuation, text.html.markdown markup.underline.link | #A9A9A9 | — |
| text.html.markdown string.other.link | #5BC0D7 | — |
| source.elixir string, source.elixir string punctuation, source.elixir constant.numeric | #3FC380 | — |
| source.elixir constant.language.symbol | #8BB82D | — |
| source.elixir keyword.operator.assignment, source.elixir keyword.operator.arithmetic, source.elixir keyword.operator | #AEA8D3 | — |
| source.elixir keyword, source.elixir keyword.control.module, source.elixir keyword.other.special-method | #B381B3 | — |
| source.elixir entity.name, source.elixir meta.function entity.name.function | #FFD700 | — |
| source.elixir variable.other.constant | #6BB9F0 | — |
| source.elixir entity.name.function-call | #81CFE0 | — |
| source.elixir, source.elixir comment.wildcard, source.elixir comment, source.elixir punctuation.definition.comment | #D4D4D4 | — |
| source.elixir comment, source.elixir punctuation.definition.comment | #E7903C | — |
| source.elixir punctuation, source.elixir comment.unused | #939393 | — |
| source.elixir variable.other.readwrite, source.elixir variable.other.readwrite punctuation | #DADFE1 | — |
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}!`;
}