Scarlet Witch Theme
Publisher: BoBencThemes in package: 2
A fan-made VS Code theme inspired by Scarlet Witch.
A fan-made VS Code theme inspired by Scarlet Witch.
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 | #6A5A70 | italic |
| comment.block.documentation | #D370E5 | italic |
| string | #E6547A | — |
| string.template | #E6547A | — |
| string.regexp | #FFB347 | — |
| constant.character.escape | #D91A4F | bold |
| constant.numeric | #B8860B | — |
| constant.language.boolean | #D91A4F | bold |
| keyword | #D91A4F | bold |
| keyword.control | #D91A4F | bold |
| keyword.other | #6A0DAD | bold |
| storage | #D91A4F | bold |
| storage.type | #D91A4F | bold |
| storage.modifier | #D91A4F | bold |
| keyword.operator | #6A0DAD | — |
| keyword.operator.arithmetic | #6A0DAD | — |
| entity.name.function | #FFB347 | — |
| entity.name.function.constructor | #FFB347 | bold |
| meta.function-call | #FFB347 | — |
| variable | #F5E6D3 | — |
| variable.other | #F5E6D3 | — |
| variable.parameter | #E6547A | italic |
| variable.language | #D91A4F | italic |
| entity.name.class | #E6547A | — |
| entity.name.type | #E6547A | — |
| entity.name.type.interface | #E6547A | — |
| entity.name.type.enum | #E6547A | — |
| constant.language | #D91A4F | bold |
| constant.other | #B8860B | — |
| support.constant | #B8860B | — |
| punctuation | #6A5A70 | — |
| punctuation.bracket | #6A5A70 | — |
| support.function | #FFB347 | — |
| support.function.builtin | #FFB347 | italic |
| support.type | #E6547A | — |
| support.other.variable | #F5E6D3 | — |
| meta.decorator | #D370E5 | — |
| markup.bold | #D91A4F | bold |
| markup.italic | #E6547A | italic |
| markup.heading | #D91A4F | bold |
| markup.underline.link | #6A0DAD | — |
| markup.inline.raw | #FFB347 | — |
| markup.quote | #6A5A70 | italic |
| entity.name.tag.html | #E6547A | — |
| entity.other.attribute-name.html | #FFB347 | — |
| string.quoted.double.html | #E6547A | — |
| entity.name.tag.css | #E6547A | — |
| entity.other.attribute-name.class | #FFB347 | — |
| support.type.property-name.css | #FFB347 | — |
| constant.numeric.color.hex.css | #E6547A | — |
| support.type.property-name.json | #FFB347 | — |
| invalid | #F5E6D3 | bold underline |
| invalid.deprecated | #F5E6D3 | strikethrough |
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}!`;
}