Clarity
Publisher: maxmckinneyThemes in package: 2
A theme for Visual Studio Code based on the Clarity design language
A theme for Visual Studio Code based on the Clarity design language
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 |
|---|---|---|
| Global settings | #111111 | — |
| string | #6ea204 | — |
| constant.language.boolean | #007db8 | — |
| constant.numeric | #f2af00 | — |
| variable, support.variable, support.class, support.constant, meta.definition.variable entity.name.function | #00bbff | — |
| keyword, modifier, variable.language.this, support.type.object, constant.language | #007db8 | — |
| entity.name.function, support.function | #f2af00 | — |
| storage.type, storage.modifier | #007db8 | — |
| support.module, support.node | #00bbff | italic |
| support.type | #00447c | — |
| entity.name.type, entity.other.inherited-class | #00447c | — |
| comment | #CCCCCC | italic |
| entity.name.type.class | #00447c | underline |
| variable.object.property, meta.field.declaration entity.name.function | #00447c | — |
| meta.definition.method entity.name.function | #00447c | — |
| meta.function entity.name.function | #00447c | — |
| template.expression.begin, template.expression.end, punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end | #007db8 | — |
| meta.embedded, source.groovy.embedded, meta.template.expression | #111111 | — |
| entity.name.tag.yaml | #00bbff | — |
| meta.object-literal.key, meta.object-literal.key string, support.type.property-name.json | #00bbff | — |
| constant.language.json | #007db8 | — |
| entity.other.attribute-name.class | #007db8 | — |
| entity.other.attribute-name.id | #6ea204 | — |
| source.css entity.name.tag | #00447c | — |
| meta.tag, punctuation.definition.tag | #007db8 | — |
| entity.name.tag | #00bbff | — |
| entity.other.attribute-name | #f2af00 | — |
| markup.heading | #007db8 | — |
| text.html.markdown meta.link.inline, meta.link.reference | #00bbff | — |
| text.html.markdown beginning.punctuation.definition.list | #007db8 | — |
| markup.italic | #00bbff | italic |
| markup.bold | #00bbff | bold |
| markup.bold markup.italic, markup.italic markup.bold | #00bbff | italic bold |
| markup.fenced_code.block.markdown punctuation.definition.markdown | #6ea204 | — |
| markup.inline.raw.string.markdown | #6ea204 | — |
| keyword.other.definition.ini | #00bbff | — |
| entity.name.section.group-title.ini | #007db8 | — |
| source.cs meta.class.identifier storage.type | #00447c | underline |
| source.cs meta.method.identifier entity.name.function | #00447c | — |
| source.cs meta.method-call meta.method, source.cs entity.name.function | #f2af00 | — |
| source.cs storage.type | #00447c | — |
| source.cs meta.method.return-type | #00447c | — |
| source.cs meta.preprocessor | #CCCCCC | — |
| source.cs entity.name.type.namespace | #111111 | — |
| Global settings | #111111 | — |
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}!`;
}