Display P3
Publisher: brunodantasThemes in package: 16
Display P3-friendly theme with multiple flavors.
Display P3-friendly theme with multiple flavors.
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 | #7fa59a | italic |
| keyword, storage.type, storage.modifier, keyword.operator.new, keyword.control, keyword.operator.expression, keyword.operator.logical | #ffcc00 | — |
| support.type, support.class, entity.name.type, entity.name.class, entity.name.interface, entity.name.enum, entity.name.struct, entity.name.trait, entity.name.impl | #4dffe1 | — |
| entity.name.function, support.function, entity.name.method, support.method, variable.function | #00b3ff | — |
| string, punctuation.definition.string, string.quoted, string.template, string.regexp | #00cc66 | — |
| constant.numeric, constant.language.boolean, constant.language.null | #ffd27a | — |
| constant.language, constant.character.escape, constant.other, constant.other.color, support.constant | #ffcc00 | — |
| variable, variable.other, variable.other.readwrite | #a8ffcf | — |
| variable.parameter | #d6f27a | — |
| variable.other.property, variable.other.member, support.variable.property, meta.object-literal.key, meta.object.member | #7dffec | — |
| keyword.operator, punctuation.separator, punctuation.accessor, punctuation.terminator, punctuation.section, punctuation.definition.parameters, punctuation.definition.arguments, punctuation.definition.typeparameters | #9fc8bb | — |
| meta.annotation, punctuation.definition.annotation, entity.name.function.decorator, meta.decorator | #ffcc00 | — |
| invalid, invalid.illegal | #ff4d6d | underline |
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}!`;
}