Mantis
Publisher: Daniel Ceron ClarosThemes in package: 3
A personalization to my liking of the default Dark+ theme.
A personalization to my liking of the default Dark+ theme.
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 | #4d724d | italic |
| punctuation.definition.comment | #4d634d | — |
| string | #fbbf24 | — |
| string.quoted | #f59e0b | — |
| string.template | #d97706 | — |
| punctuation.definition.string | #92400e | — |
| punctuation.definition.template-expression | #b45309 | — |
| constant.numeric | #06b6d4 | — |
| constant.language.boolean | #0891b2 | — |
| constant.language.null | #0e7490 | — |
| constant.language.undefined | #155e75 | — |
| keyword.control | #a855f7 | — |
| keyword.control.flow | #ff3333 | — |
| keyword.control.conditional | #ce358e | — |
| keyword.control.loop | #6d28d9 | — |
| keyword.control.trycatch | #5b21b6 | — |
| keyword.control.switch | #4c1d95 | — |
| keyword.operator.new | #c084fc | — |
| keyword.other.debugger | #ddd6fe | — |
| storage.type.function | #c649d1 | — |
| storage.type.class | #c4b5fd | — |
| storage.type | #c649d1 | — |
| storage.modifier | #c90000 | — |
| keyword.control.import | #38bdf8 | — |
| keyword.control.export | #0ea5e9 | — |
| keyword.control.from | #0284c7 | — |
| keyword.control.as | #0369a1 | — |
| keyword.control.default | #075985 | — |
| entity.name.function | #fbbf24 | — |
| meta.function-call entity.name.function | #f59e0b | — |
| support.function | #d97706 | — |
| meta.function-call | #b45309 | — |
| support.function.console | #92400e | — |
| support.function.builtin | #78350f | — |
| support.function.dom | #451a03 | — |
| entity.name.type | #10b981 | — |
| entity.name.class | #059669 | — |
| support.class | #047857 | — |
| entity.other.inherited-class | #065f46 | — |
| storage.type.primitive | #064e3b | — |
| keyword.type | #022c22 | — |
| support.type.primitive | #34d399 | — |
| entity.name.type.interface | #6ee7b7 | — |
| entity.name.type.alias | #9deccd | — |
| meta.type.parameters | #c6f6d5 | — |
| variable | #e5e7eb | — |
| variable.other.readwrite | #d1d5db | — |
| variable.other.object | #ffff7f | — |
| variable.other.constant | #6b7280 | — |
| variable.other.enummember | #4b5563 | — |
| variable.language.arguments | #374151 | — |
| support.variable.property | #1f2937 | — |
| variable.other.property | #38bdf8 | — |
| meta.object-literal.key | #0ea5e9 | — |
| variable.language.this | #a855f7 | italic |
| variable.language.super | #9333ea | italic |
| keyword.operator | #f472b6 | — |
| keyword.operator.arithmetic | #ec4899 | — |
| keyword.operator.comparison | #db2777 | — |
| keyword.operator.logical | #be185d | — |
| keyword.operator.assignment | #9d174d | — |
| keyword.operator.spread | #831843 | — |
| keyword.operator.rest | #701a75 | — |
| punctuation.separator | #d1d5db | — |
| punctuation.terminator | #ffff7f | — |
| punctuation.accessor | #6b7280 | — |
| punctuation.definition.block | #4b5563 | — |
| punctuation.definition.parameters | #374151 | — |
| punctuation.definition.array | #1f2937 | — |
| entity.name.tag.jsx | #38bdf8 | — |
| entity.name.tag.tsx | #0ea5e9 | — |
| entity.other.attribute-name.jsx | #0284c7 | — |
| entity.other.attribute-name.tsx | #0369a1 | — |
| punctuation.definition.tag.jsx | #075985 | — |
| punctuation.definition.tag.tsx | #0c4a6e | — |
| support.type.property-name.json | #38bdf8 | — |
| string.regexp | #f59e0b | — |
| constant.character.character-class.regexp | #d97706 | — |
| constant.other.character-class.regexp | #b45309 | — |
| meta.decorator | #c084fc | italic |
| punctuation.decorator | #c90000 | — |
| markup.bold | #fbbf24 | — |
| markup.heading | #f59e0b | — |
| markup.italic | #38bdf8 | italic |
| invalid | #ef4444 | — |
| invalid.illegal | #dc2626 | — |
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}!`;
}