Puff - Theme
Publisher: Jasper CrowleyThemes in package: 1
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 |
|---|---|---|
| — | #fff | — |
| comment | #343f46 | italic |
| string | #7FD6FA | — |
| string.regex | #8abeb7 | — |
| string.other.link | #f25a55 | — |
| constant | #277BD3 | — |
| constant.numeric | #FF8308 | — |
| constant.language | #de347a | — |
| constant.character, constant.other | #FF0883 | — |
| variable.function | #48a3ff | |
| variable.other | #b7a7e2 | |
| variable | #fff | |
| variable.assignment | #f25a55 | |
| keyword | #FF0883 | — |
| keyword.control | #0883FF | — |
| keyword.control.definition | #FF0883 | — |
| keyword.operator | #8E1EFF | — |
| keyword.other.unit | #8E1EFF | italic |
| storage | #FF0883 | italic |
| storage.type | #08FF83 | — |
| storage.import | #83FF08 | italic |
| entity.name.function | #83FF08 | — |
| entity.name.class | #83FF08 | — |
| entity.name.type.class | #83FF08 | — |
| entity.name.tag | #08FF83 | — |
| entity.name.section | #277BD3 | — |
| entity.other.inherited-class | #83FF08 | — |
| entity.other.attribute-name | #277BD3 | |
| entity.other.attribute-name.html | #277BD3 | |
| entity.other.attribute-name.id | #277BD3 | — |
| entity.name.function | #ff65b2 | — |
| variable.parameter | #08FF83 | italic |
| entity.name.tag | #08FF83 | |
| entity.other.attribute-name | #08FF83 | |
| support.function | #08FF83 | — |
| support.constant | #DE347A | |
| support.type, support.class | #B4E1FD | italic |
| support.other.variable | #3299CC | |
| invalid | #ffaaaa | |
| invalid.deprecated | #ffaaaa | — |
| punctuation.definition.comment | #404449 | — |
| punctuation.definition.array | #BFD7DB | — |
| punctuation.definition.parameters | #BFD7DB | — |
| punctuation.definition.heading | #277BD3 | — |
TypeScript sample highlighted with this variant's colors and tokenColors.
Loading...
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}!`;
}
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}!`;
}