Darkit
Publisher: mrheioThemes in package: 1
A dark theme.
A dark theme.
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 | #7680a4 | — |
| variable | #f1f5f9 | — |
| entity.name.function, support.function, meta.function-call.generic, support.function.magic, punctuation.definition.template-expression | #52f6ff | — |
| variable.parameter | #cce0ff | — |
| keyword, meta.method.declaration storage.type | #a5b4fc | — |
| storage, variable.language, keyword.operator.expression, keyword.operator.new, keyword.function | #a5b4fc | — |
| support.class, entity.name.type, entity.other.inherited-class, entity.name.scope-resolution, support.type | #fdba74 | — |
| support.type.primitive, entity.other.attribute-name.pseudo-class, entity.other.attribute-name.pseudo-element | #ff7a9c | — |
| string | #f67ede | — |
| string.regexp | #a5b4fc | italic |
| entity.name.tag, variable.language.this, variable.language.super, variable.parameter.function.language.special.self, variable.language.special.self, entity.name.tag.reference | #fdba74 | — |
| support.type.property-name.json, source.yaml entity.name.tag | #a3c8ff | — |
| punctuation.definition.tag.begin, punctuation.definition.tag.end, punctuation.definition.typeparameters.begin, punctuation.definition.typeparameters.end | #fb923c | — |
| entity.other.attribute-name | #a3c8ff | italic |
| entity.other.attribute-name.id | #68f7ca | — |
| support.constant, constant.language, support.type.builtin | #ff7a9c | — |
| constant.numeric | #ff7a9c | — |
| keyword.operator, keyword.operator.assignment, punctuation.accessor, punctuation.separator.key-value, punctuation.definition.block.sequence.item, punctuation.separator.dictionary.key-value, punctuation.definition.variable, punctuation.separator.colon, punctuation.separator.period, punctuation.section, keyword.other.unit, punctuation.definition.block | #a3faff | — |
| source.css support.type.property-name | #c4b5fd | — |
| support.variable, variable.other.predefined, variable.other.property, meta.object.member | #8ff9d8 | — |
| variable.other.readwrite.alias, entity.name.namespace | #d8b4fe | — |
| variable.other.constant.object | #cbd5e1 | — |
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}!`;
}