Lego Dark Theme
Publisher: okerbsThemes in package: 1
A vibrant color theme based on material theme and visual assist.
A vibrant color theme based on material theme and visual assist.
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 |
|---|---|---|
| token.info-token | #6796E6 | — |
| token.warn-token | #CD9731 | — |
| token.error-token | #F44747 | — |
| token.debug-token | #B267E6 | — |
| variable, entity.name.variable, meta.tag.attributes, variable.parameter.uppercase.prolog, variable.parameter.prolog | #FEF6D0 | |
| punctuation.definition.tag, meta.block, punctuation, keyword.operator, keyword.assignment, keyword.operator.arithmetic, keyword.operator.assignment, keyword.operator.logical, storage.modifier.pointer.cpp | #CAC8CB | |
| comment, comment.punctuation.definition.commententity.name.variable | #7F7F7F | |
| keyword, keyword.control, keyword.operator.new, keyword.other, storage.modifier, keyword.operator.expression, punctuation.definition.directive.cpp | #FF5242 | |
| function, entity.name.function, meta.block.cpp, support.function, storage.type.function.arrow, | #89B4FA | |
| entity.name.namespace, entity.name.type.namespace, storage.type.annotation.java, punctuation.definition.annotation.java, punctuation.definition.decorator, entity.name.function.decorator | #C3E88D | |
| entity.name.type.class, class, type, entity.name.type, support.type, entity.name.tag, storage.type | #F9CB5E | |
| string, support.constant, variable.parameter, variable.other.constant, constant.language.boolean, constant, entity.name.variable.parameter, meta.method-call.java, meta.fstring, string.quoted.other.lt-gt.include.cpp, punctuation.section.regexp.prolog | #F78C6C |
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}!`;
}