Hop Light
Publisher: buberssonThemes in package: 1
Light theme with friendly colors
Light theme with friendly colors
Full workbench mockup using this variant's colors and tokenColors.
Loading...
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #1A1A1A | — |
| comment | #96928f | — |
| keyword.operator | #398BC9 | — |
| string | #bd7111 | — |
| constant.numeric | #398BC9 | — |
| support.constant, constant.language | #a5319c | — |
| variable.other.constant.property, constant.character, constant.other | #398BC9 | — |
| variable | #333333 | — |
| variable.language.this | #398bc9 | — |
| keyword | #7B1FA2 | — |
| storage | #AF33A6 | — |
| storage.type | #7B1FA2 | — |
| storage.type.class.jsdoc | #8a8a8a | — |
| entity.name.class | #82776c | — |
| comment.entity.name.class | #8c7c76 | — |
| variable.other.jsdoc | #8a8a8a | — |
| comment.block.documentation | — | — |
| entity.other.inherited-class | #CB4718 | — |
| entity.name.function | #3f831e | — |
| comment.entity.name.function | #6c7b65 | — |
| variable.parameter | #398bc9 | — |
| support.function | #398BC9 | — |
| support.constant | #398BC9 | — |
| support.class | #4e94ce | — |
| support.type | #3F831E | — |
| support.other.variable | #CB4718 | — |
| invalid | #FF5722 | — |
| invalid.deprecated | #FF8A65 | — |
| markup.heading | #CB4718 | — |
| punctuation.definition.tag.html, punctuation.definition.tag.begin, punctuation.definition.tag.end, entity.name.tag | #398BC9 | — |
| entity.other.attribute-name | #AF33A6 | — |
| string.quoted.single.html, string.quoted.double.html, string.html | #3F831E | — |
| meta.selector.css, entity.other.attribute-name.id | #AF33A6 | — |
| storage.modifier.ts | #C07F00 | — |
| cast.expr.ts | #398BC9 | — |
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}!`;
}