Magenta
Publisher: MagentaThemes in package: 4
AI audit and compliance tool — flags AI-generated and pasted code inline.
AI audit and compliance tool — flags AI-generated and pasted code inline.
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 |
|---|---|---|
| source, text | #e2cfe8 | — |
| comment, punctuation.definition.comment | #6a4a7a | italic |
| comment.block.documentation, comment.line.double-slash.documentation | #7a5888 | italic |
| string, string.quoted, string.template | #c8d8a0 | — |
| constant.character.escape, string.regexp | #e0c878 | — |
| punctuation.definition.template-expression | #e06bbd | — |
| constant.numeric | #e0c878 | — |
| constant.language.boolean, constant.language.null, constant.language.undefined | #c090e0 | — |
| constant.language | #c090e0 | — |
| constant.other, variable.other.constant | #d090c8 | — |
| keyword.control, keyword.control.import, keyword.control.export, keyword.control.from, keyword.control.as, keyword.control.return, keyword.control.if, keyword.control.else, keyword.control.for, keyword.control.while, keyword.control.switch, keyword.control.case, keyword.control.default, keyword.control.break, keyword.control.continue, keyword.control.try, keyword.control.catch, keyword.control.finally, keyword.control.throw, keyword.control.async, keyword.control.await, keyword.control.yield | #e06bbd | bold |
| keyword, keyword.other | #c44fa0 | — |
| keyword.operator.word, keyword.operator.new, keyword.operator.delete, keyword.operator.typeof, keyword.operator.instanceof, keyword.operator.in, keyword.operator.of | #d060b0 | — |
| keyword.operator | #b07ac8 | — |
| punctuation, meta.brace, punctuation.separator, punctuation.terminator | #9060a8 | — |
| punctuation.definition.block, meta.brace.curly, meta.brace.round, meta.brace.square | #c070b8 | — |
| storage.type, storage.modifier | #e06bbd | bold |
| support.type, entity.name.type, entity.name.type.alias, entity.name.type.interface, entity.other.inherited-class, meta.type.annotation, meta.type.parameters | #c9a8d4 | — |
| support.type.primitive, keyword.type, storage.type.boolean.go, storage.type.string.go, storage.type.numeric.go | #b87fc8 | — |
| entity.name.function, meta.definition.method entity.name.function, meta.function-call entity.name.function | #f090d0 | — |
| meta.function-call.generic, meta.method-call | #e880c8 | — |
| variable.parameter, meta.parameters variable.other | #d8a8e0 | italic |
| variable, variable.other.readwrite | #e2cfe8 | — |
| variable.language.this, variable.language.self, variable.language.super | #e06bbd | italic |
| variable.other.property, support.variable.property, meta.property-name | #d8b0e0 | — |
| entity.name.class, entity.name.type.class | #c9a8d4 | bold |
| meta.class entity.name.function | #c9a8d4 | — |
| meta.decorator, punctuation.decorator, entity.name.function.decorator | #a06bc8 | italic |
| entity.name.namespace, entity.name.module, support.module | #b87fc8 | — |
| string.quoted.double.import, string.quoted.single.import | #c8d8a0 | — |
| support.function, support.function.builtin | #e06bbd | — |
| support.class, support.class.builtin | #c9a8d4 | — |
| entity.name.tag, support.class.component | #e06bbd | — |
| entity.other.attribute-name | #c9a8d4 | — |
| string.quoted.double.html, string.quoted.single.html | #c8d8a0 | — |
| punctuation.section.embedded | #e06bbd | — |
| constant.character.entity.html, punctuation.definition.entity.html | #e0c878 | — |
| entity.other.attribute-name.class.css, entity.other.attribute-name.id.css | #f090d0 | — |
| support.type.property-name.css | #c9a8d4 | — |
| support.constant.property-value.css | #c8d8a0 | — |
| keyword.other.unit.css, constant.numeric.css | #e0c878 | — |
| entity.other.attribute-name.pseudo-class.css, entity.other.attribute-name.pseudo-element.css | #a06bc8 | italic |
| markup.heading, entity.name.section.markdown | #e06bbd | bold |
| markup.bold | #f090d0 | bold |
| markup.italic | #d8a8e0 | italic |
| markup.inline.raw, markup.fenced_code.block | #c8d8a0 | — |
| markup.underline.link | #e06bbd | underline |
| punctuation.definition.list.begin.markdown | #c44fa0 | — |
| markup.quote | #7a5888 | italic |
| support.type.property-name.json | #d8a8e0 | — |
| string.regexp | #e0c878 | — |
| keyword.operator.quantifier.regexp, keyword.operator.or.regexp, keyword.control.anchor.regexp | #e06bbd | — |
| punctuation.definition.group.regexp | #c44fa0 | — |
| invalid | #e05070 | underline |
| invalid.deprecated | #d0848a | 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}!`;
}