Sourcerer
Publisher: Brian Pruitt-GoddardThemes in package: 1
Sourcerer Theme based on the Vim and Hyper themes
Sourcerer Theme based on the Vim and Hyper themes
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 |
|---|---|---|
| — | #C2C2B0 | — |
| comment | #75715E | — |
| string | #CC8800 | — |
| constant.numeric | #528B8B | — |
| constant.language | #528B8B | — |
| constant.character, constant.other | #528B8B | — |
| variable | #9ebac2 | — |
| keyword | #AA4450 | — |
| storage | #AA4450 | |
| storage.type | #6688AA | italic |
| entity.name.class | #719611 | underline |
| entity.other.inherited-class | #719611 | italic underline |
| entity.name.function | #719611 | |
| variable.parameter | #6688AA | italic |
| entity.name.tag | #AA4450 | |
| entity.other.attribute-name | #719611 | |
| support.function | #6688AA | |
| support.constant | #6688AA | |
| support.type, support.class | #6688AA | italic |
| support.other.variable | — | |
| invalid | #F8F8F0 | |
| invalid.deprecated | #F8F8F0 | — |
| entity.name.section.markdown | #AA4450 | — |
| punctuation.definition.heading.markdown | #AA4450 | — |
| punctuation.definition.quote.begin.markdown | #CC8800 | — |
| punctuation.definition.list.begin.markdown | #6688AA | — |
| beginning.punctuation.definition.list.markdown | #AA4450 | — |
| markup.inline.raw.string.markdown | #CC8800 | — |
| markup.italic.markdown | #90B0D1 | italic |
| markup.bold.markdown | #719611 | bold |
| meta.diff, meta.diff.header | #6688AA | italic |
| markup.deleted | #AA4450 | — |
| markup.changed | #FF6A6A | — |
| markup.inserted | #719611 | — |
| punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded | #6688AA | — |
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}!`;
}