Pye PyCharm Theme
Publisher: med-mhamdiThemes in package: 1
A PyCharm inspired theme for VS Code
A PyCharm inspired theme for VS Code
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 |
|---|---|---|
| string | #CE9178 | — |
| comment | #676675 | — |
| keyword, keyword.control | #569CD6 | — |
| support.function.builtin | #fac043 | |
| constant.numeric.dec.python | #92b96b | — |
| storage.type.function.python, constant.language.python, keyword.control.flow.python, variable.parameter.function.language.special.self.python | #c88cdc | — |
| meta.function-call.generic.python, keyword.operator.comparison.python | #e4d314 | |
| keyword.operator.logical.python, keyword.operator.arithmetic.python, variable.parameter.function.language.python | #61afe1 | |
| text.html.markdown meta.tag.inline, text.html.markdown meta.tag.block.any.html | #73fd0a | — |
| string.quoted.docstring.multi.python | #4f8427 | — |
| text.html.markdown entity.name.tag | #00fe51 | — |
| text.html.markdown punctuation.definition.tag | #00ffd0 | — |
| text.html.markdown meta.attribute-with-value | #ffff00 | — |
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}!`;
}