RattleSnake
Publisher: LeTorkyThemes in package: 2
A warm paper theme with burnt brown syntax highlighting and dark baby blue accents, in light and dark variants. Includes structural highlighting for Python classes, functions, and docstrings.
A warm paper theme with burnt brown syntax highlighting and dark baby blue accents, in light and dark variants. Includes structural highlighting for Python classes, functions, and docstrings.
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 | #948A78 | italic |
| string, string.quoted | #A9CFE3 | — |
| constant.numeric, constant.language, constant.character | #7FB2D1 | — |
| support.constant | #7FB2D1 | — |
| keyword, keyword.control, storage, storage.type | #C8875A | bold |
| keyword.operator | #D9A876 | — |
| entity.name.function, support.function | #D9A876 | italic |
| meta.function-call.generic.python, meta.function-call.python | #D9A876 | italic |
| entity.name.type, entity.name.class, support.type, support.class | #5A93B5 | bold |
| variable | #EDEAE2 | — |
| variable.parameter | #948A78 | — |
| variable.parameter.function.language.special.self.python, variable.parameter.function.language.special.cls.python | #5A93B5 | — |
| constant.other.caps.python | #7FB2D1 | bold |
| entity.name.tag | #C8875A | — |
| entity.other.attribute-name | #D9A876 | — |
| punctuation, meta.brace | #948A78 | — |
| punctuation.definition.parameters, meta.brace.round, punctuation.parenthesis | #5A93B5 | — |
| markup.heading | #A66B3E | bold |
| markup.bold | #EDEAE2 | bold |
| markup.italic | #EDEAE2 | italic |
| markup.underline.link | #A9CFE3 | underline |
| invalid | #E0776B | — |
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}!`;
}