r12i-theme
Publisher: Rafal GrabowskiThemes 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 |
|---|---|---|
| comment, punctuation.definition.comment | #6C7380 | italic |
| keyword, storage.type | #D7A8E6 | — |
| variable.other.readwrite, variable.other.readwrite.ruby, variable.parameter.ruby, variable.other.readwrite.class.ruby, variable.other.readwrite.global.ruby, variable.other.constant.ruby, meta.function-call.ruby variable.other.readwrite.ruby, meta.function-call.ruby variable.other.readwrite.class.ruby, meta.function-call.ruby variable.other.readwrite.global.ruby, meta.function-call.ruby variable.other.constant.ruby, meta.function-call.ruby variable.parameter.ruby | #E8E8E2 | — |
| variable.other.readwrite.instance.ruby, meta.function-call.ruby variable.other.readwrite.instance.ruby | #e080b0 | — |
| string, constant.other.symbol | #5ac16c | — |
| constant.numeric, constant.language | #A6B1E1 | — |
| meta.function-call.ruby, meta.function-call.ruby entity.name.function, meta.function-call.ruby entity.name.function.ruby, meta.function-call.ruby entity.name.function.call, meta.function-call.ruby entity.name.function.call.ruby, meta.function-call.ruby entity.name.method, meta.function-call.ruby entity.name.method.ruby, meta.function-call.ruby entity.name.method.call, meta.function-call.ruby entity.name.method.call.ruby, meta.function-call.ruby support.function, meta.function-call.ruby support.function.ruby, meta.function-call.ruby support.function.call, meta.function-call.ruby support.function.call.ruby | #7FB7E8 | — |
| entity.name.type, support.type | #8BE9FD | — |
| entity.name.class.ruby, entity.name.type.class.ruby, entity.other.inherited-class.ruby, meta.class | #FFF7B2 | — |
| entity.name.namespace.ruby, entity.name.type.module, entity.name.type.class.ruby, entity.other.inherited-class.ruby, meta.class, meta.module.ruby, support.class, entity.name.class, entity.name.class.ruby, constant.other.constant.ruby, variable.other.constant.ruby, entity.name.type.class.ruby, entity.name.type.module.ruby, support.constant.ruby | #FAF9F6 | — |
| punctuation.separator.namespace.ruby, punctuation.separator.inheritance.ruby, punctuation.separator.method.ruby, punctuation.separator.constant.ruby | #FAF9F6 | — |
| entity.name.tag, meta.tag | #E1B574 | — |
| markup.heading | #E1B574 | — |
| markup.bold | — | bold |
| markup.italic | — | italic |
| invalid, invalid.deprecated | #FFFFFF | — |
| meta.diff, meta.diff.header, punctuation.definition.to-file.diff, punctuation.definition.from-file.diff, punctuation.definition.range.diff | #7FB7E8 | italic |
| markup.deleted, punctuation.definition.deleted.diff | #FF8888 | |
| markup.changed | #FFD580 | |
| markup.inserted, punctuation.definition.inserted.diff | #A6B1E1 | — |
| constant.other.constant, constant.other.constant.ruby, variable.other.constant, variable.other.constant.ruby, meta.function-call.ruby constant.other.constant, meta.function-call.ruby constant.other.constant.ruby, meta.function-call.ruby variable.other.constant, meta.function-call.ruby variable.other.constant.ruby, meta.function-call constant.other.constant, meta.function-call constant.other.constant.ruby, meta.function-call variable.other.constant, meta.function-call variable.other.constant.ruby, meta.function-call.ruby entity.name.class, meta.function-call.ruby entity.name.class.ruby, meta.function-call.ruby entity.name.type.class, meta.function-call.ruby entity.name.type.class.ruby, meta.function-call.ruby entity.other.inherited-class.ruby, meta.function-call.ruby meta.class, meta.function-call.ruby meta.class.ruby, meta.function-call.ruby support.class, meta.function-call.ruby support.class.ruby, meta.function-call.ruby entity.name.type.module, meta.function-call.ruby entity.name.type.module.ruby, meta.function-call.ruby entity.name.namespace.ruby, meta.function-call.ruby meta.module.ruby, meta.function-call.ruby support.module.ruby, meta.function-call.ruby support.module, meta.function-call.ruby entity.name.type, meta.function-call.ruby entity.name.type.ruby, meta.function-call.ruby entity.name, meta.function-call.ruby entity.name.ruby, entity.name.type.class.ruby, entity.name.type.module.ruby, entity.name.namespace.ruby, entity.other.inherited-class.ruby, meta.class.ruby, meta.module.ruby, support.class.ruby, support.module.ruby, entity.name.type.ruby, entity.name.ruby | #E1B574 | — |
| punctuation.separator.namespace.ruby, punctuation.separator.inheritance.ruby, punctuation.separator.method.ruby, punctuation.separator.constant.ruby | #E1B574 | — |
| variable.parameter, variable, variable.other.local, variable.other.readwrite.local.ruby, meta.function.parameters.ruby variable.other.readwrite.local.ruby, meta.block.ruby variable.other.readwrite.local.ruby | #e080b0 | italic |
| entity.name.class, entity.name.type.class, entity.other.inherited-class, support.class, support.module, entity.name.namespace, entity.name.type.module | — | |
| variable.parameter.block, variable.parameter.block.ruby, variable.parameter.function, variable.parameter.function.ruby, meta.block variable.other.readwrite.local, variable.other.readwrite.local, meta.block variable.parameter, meta.block variable.parameter.ruby, variable.parameter | #e080b0 | italic |
| variable.other.local, variable.other.readwrite.local, variable.other.readwrite.local.ruby, variable.other.local.ruby, variable.other | #e080b0 | italic |
| variable.other.readwrite.instance, variable.other.readwrite.instance.ruby, variable.other.readwrite.class, variable.other.readwrite.class.ruby, variable.other.readwrite.global, variable.other.readwrite.global.ruby | — |
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}!`;
}