Cube Theme
Publisher: ccforwardThemes in package: 1
A theme made by ccforward
A theme made by ccforward
Full workbench mockup using this variant's colors and tokenColors.
Loading...
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #F8F8F2 | — |
| comment | #75715E | — |
| string | #ffd54f | — |
| constant.numeric | #AE81FF | — |
| constant.language | #f111a5 | — |
| constant.character, constant.other | #AE81FF | — |
| variable | — | |
| keyword, variable.other.dollar.only.js | #ff0066 | — |
| storage | #F92672 | |
| storage.type | #08afef | italic |
| entity.name.class | #A6E22E | underline |
| entity.other.inherited-class | #A6E22E | italic underline |
| entity.name.function | #00ff00 | — |
| variable.parameter | #ff6600 | italic |
| punctuation.separator.inheritance.php, punctuation.definition.tag.html, punctuation.definition.tag.begin.html, punctuation.definition.tag.end.html | #15B8D9 | — |
| entity.name.tag | #ff0650 | normal |
| entity.other.attribute-name | #00FF00 | |
| support.function | #08afef | |
| support.constant | #08afef | |
| support.type, support.class | #08afef | italic |
| support.other.variable | — | |
| invalid | #F8F8F0 | |
| invalid.deprecated | #F8F8F0 | — |
| punctuation.definition.string.begin.json | — | |
| source.json meta meta.structure.dictionary string | #ff5722 | — |
| source.json meta meta meta.structure.dictionary string | #228d1b | — |
| source.json meta meta meta meta.structure.dictionary string | #ff5722 | — |
| source.json meta meta meta meta meta.structure.dictionary string | #03a9f4 | — |
| source.json meta meta meta meta meta meta.structure.dictionary string | #ffd54f | — |
| meta.diff, meta.diff.header | #75715E | — |
| markup.deleted | #F92672 | — |
| markup.inserted | #A6E22E | — |
| markup.changed | #E6DB74 | — |
| constant.numeric.line-number.find-in-files - match | #AE81FFA0 | — |
| entity.name.filename.find-in-files | #E6DB74 | — |
| sublimelinter.mark.warning | #EDBA00 | — |
| sublimelinter.gutter-mark | #FFFFFF | — |
| sublimelinter.mark.error | #DA2000 | — |
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}!`;
}