Xcode Theme for VSCode
Publisher: xcode-theme-for-vscodeThemes in package: 2
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 | #8E8E93 | — |
| string, punctuation.definition.string, punctuation.support.type.property-name.begin.json, punctuation.support.type.property-name.end.json | #D70015 | — |
| constant.character | #1D77EF | — |
| constant.numeric | #1D77EF | — |
| constant.other.placeholder, constant.character.escape | #1D1D1F | — |
| keyword, keyword.operator.new, keyword.operator.wordlike, keyword.operator.logical.and, keyword.operator.sizeof, storage, variable.language, constant.language | #AD3DA4 | bold |
| keyword.control.directive, punctuation.definition.directive | #804000 | — |
| entity.name.type.class, entity.name.type | #0058A0 | — |
| variable.parameter | #0073C7 | — |
| entity.name.type, entity.other.inherited-class | #248A3D | — |
| support.class | #5856D6 | — |
| entity.name.function | #0F68A0 | — |
| support.function | #804FB8 | — |
| constant.other | #0F68A0 | — |
| variable.other.property, variable.other.object.property | #0F68A0 | — |
| entity.name.function.preprocessor | #804000 | — |
| entity.name.tag | #5856D6 | — |
| entity.other.attribute-name | #804FB8 | — |
| markup.inserted, punctuation.definition.inserted | #28CD41 | — |
| markup.deleted, punctuation.definition.deleted | #FF3333 | — |
| variable, meta.function-call.generic | #1D1D1F | — |
| keyword.operator | #1D1D1F | — |
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}!`;
}