Bocchi The Rock Theme
Publisher: Nijika-jiaThemes in package: 8
VS Code theme inspired by Bocchi The Rock!
VS Code theme inspired by Bocchi The Rock!
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 |
|---|---|---|
| keyword, storage.type, storage.modifier, keyword.control, keyword.operator.new | #5C015C | bold |
| entity.name.type, entity.name.class, entity.name.struct, entity.name.enum, entity.name.interface, support.type, support.class | #B4698C | bold |
| entity.name.function, support.function, meta.function-call | #5C015C | — |
| variable, variable.other, variable.parameter, variable.language | #010001 | — |
| constant, constant.language, constant.character, constant.other | #5C015C | bold |
| constant.numeric, constant.numeric.integer, constant.numeric.float, constant.numeric.hex, constant.numeric.octal, constant.numeric.binary, constant.numeric.decimal | #B4698C | — |
| string, string.template, string.quoted | #B4698C | — |
| comment, punctuation.definition.comment | #A8969299 | italic |
| keyword.operator, punctuation.definition | #5C015C | — |
| keyword.operator.arithmetic, keyword.operator.comparison, keyword.operator.logical, keyword.operator.assignment | #B4698C | — |
| punctuation, punctuation.definition.block, punctuation.definition.parameters, punctuation.section, meta.brace | #B4698C | — |
| meta.object-literal.key, variable.object.property, support.type.property-name | #5C015C | — |
| constant.language, constant.language.boolean, constant.language.null, constant.language.undefined, variable.language.this, variable.language.super | #B4698C | italic bold |
| variable.parameter | #010001 | italic |
| keyword.control.import, keyword.control.export, keyword.control.from | #5C015C | bold |
| entity.name.tag, punctuation.definition.tag | #5C015C | — |
| entity.other.attribute-name | #B4698C | italic |
| support.type.property-name, support.type.vendored.property-name | #5C015C | — |
| support.constant.property-value, support.constant.vendored.property-value | #B4698C | — |
| markup.heading | #5C015C | bold |
| markup.underline.link, string.other.link | #B4698C | — |
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}!`;
}