First Sight
Publisher: Eric ThaiThemes in package: 1
Idk, was thinking of a girl :v
Idk, was thinking of a girl :v
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 |
|---|---|---|
| meta.embedded, source.groovy.embedded | #2a1520 | — |
| comment | #b898a8 | italic |
| keyword, keyword.control, keyword.operator.new, keyword.operator.expression, keyword.operator.instanceof, keyword.operator.logical.python, keyword.operator.wordlike, storage, storage.type, storage.modifier | #c40060 | italic |
| keyword.operator | #c8407a | |
| entity.name.function, meta.function-call, support.function | #c01858 | — |
| entity.name.type, entity.name.class, entity.name.struct, entity.name.interface, support.type, support.class | #5218d0 | — |
| string, meta.embedded.assembly | #7b10cc | — |
| meta.template.expression | #2a1520 | — |
| constant.numeric, keyword.operator.plus.exponent, keyword.operator.minus.exponent | #c84000 | — |
| constant.language | #c40060 | italic |
| variable, variable.parameter, variable.other.readwrite, variable.other.property | #2a1545 | — |
| variable.language | #c40060 | italic |
| variable.other.enummember | #c84000 | — |
| string.regexp, constant.regexp | #d01868 | — |
| entity.name.tag, meta.tag | #c40060 | — |
| entity.other.attribute-name | #c83878 | — |
| support.type.vendored.property-name, support.type.property-name, source.css variable | #c01858 | — |
| support.constant.property-value, support.constant.color | #7b10cc | — |
| support.type.property-name.json | #2a1545 | — |
| punctuation | #b08898 | — |
| markup.heading | #a02060 | bold |
| markup.inline.raw | #7040a0 | — |
| markup.inserted | #407840 | — |
| markup.deleted | #c02040 | — |
| markup.changed | #c06020 | — |
| invalid | #c02040 | — |
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}!`;
}