Spect
Publisher: Hazeq Bin MohsinThemes in package: 7
✨ Professional icon pack and color theme for a better development experience ✨
✨ Professional icon pack and color theme for a better development experience ✨
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 | #888888 | italic |
| string, string.quoted, meta.string | #ffaa00 | — |
| string.template, string.template variable | #ffaaaa | — |
| punctuation.definition.string.begin, punctuation.definition.string.end | #ffaa0055 | — |
| string.regexp, constant.character.escape | #00ffff | — |
| constant.other.symbol | #00ff00 | — |
| keyword.control, keyword, storage.type, storage.modifier, storage | #ab9df2 | bold |
| punctuation.definition.template-expression | #ffffff | — |
| punctuation.section.embedded | #ffffff | — |
| entity.name.function, support.function, entity.name.method | #00ffff | — |
| meta.function-call, variable.function, meta.function-call.generic | #00ffff | — |
| variable.parameter, meta.parameter | #cccccc | — |
| support.macro | #00ffff | — |
| variable, variable.other, meta.definition.variable | #cccccc | — |
| variable.member | #cccccc | — |
| variable.language | #00ffff | italic |
| variable.other.constant, variable.other.readwrite | #00ffff | — |
| entity.name.type, entity.name.class, support.type, support.class, entity.name.type.class | #ffcc00 | — |
| entity.other.inherited-class | #ffcc00 | italic |
| constant.numeric | #ff8800 | — |
| constant.language | #ff8800 | — |
| constant.language.boolean, constant.language.null | #ff8800 | — |
| keyword.operator, punctuation.accessor | #ffffff | — |
| punctuation, meta.brace, meta.delimiter, punctuation.separator, punctuation.terminator, punctuation.section | #aaaaaa | — |
| meta.embedded | #ffffff | — |
| entity.name.tag, meta.tag, meta.tag.sgml | #ffffff | — |
| punctuation.definition.tag.begin, punctuation.definition.tag.end, punctuation.definition.tag | #888888 | — |
| entity.other.attribute-name, meta.attribute | #ffcc00 | — |
| support.class.component | #ffcc00 | — |
| entity.other.attribute-name.class, entity.other.attribute-name.id | #ffcc00 | — |
| entity.other.attribute-name.pseudo-class | #00ffff | — |
| source.css entity.name.tag, source.scss entity.name.tag, source.sass entity.name.tag, source.less entity.name.tag | #ffffff | — |
| support.type.property-name, support.type.property-name.css | #00ffff | — |
| support.constant.property-value | #00ff00 | — |
| source.css support.type, source.scss support.type, source.sass support.type, source.less support.type | #888888 | — |
| meta.decorator variable.other, meta.decorator punctuation.decorator, storage.type.annotation, entity.name.function.decorator | #ffcc00 | — |
| entity.name.import, entity.name.package | #cccccc | — |
| markup.heading, markup.heading punctuation.definition.heading, markup.heading entity.name | #ffffff | bold |
| markup.bold | #ffffff | bold |
| markup.italic, emphasis | #ffffff | italic |
| markup.italic markup.bold, markup.bold markup.italic | — | bold italic |
| markup.underline | — | underline |
| markup.inline.raw, markup.raw | #00ff00 | — |
| markup.quote | #888888 | italic |
| meta.separator | #666666 | bold |
| markup.list punctuation.definition.list.begin | #ffffff | — |
| markup.strike | #888888 | — |
| markup.table | #00ffff | — |
| markup.strong | — | bold |
| support.type.property-name.json, string.quoted.key.json | #00ffff | — |
| meta.diff, meta.diff.header | #888888 | — |
| markup.inserted | #00ff00 | — |
| markup.deleted | #ff0000 | — |
| markup.changed | #ffff00 | — |
| invalid, invalid.deprecated | #ff0000 | strikethrough |
| message.error | #ff0000 | — |
| entity.name.filename.find-in-files | #cccccc | — |
| constant.numeric.line-number.match | #ffff00 | — |
| markup.underline.link, string.other.link | #00ffff | underline |
| source, text | #ffffff | — |
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}!`;
}