Midnight Moon Theme
Publisher: Adel GannemThemes in package: 1
Un tema oscuro y elegante para VS Code/Cursor
Un tema oscuro y elegante para VS Code/Cursor
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 |
|---|---|---|
| entity.name.type.typescript, entity.name.type.js | #c792ea | — |
| variable, variable.other.object | #89ddff | — |
| keyword.control, storage.type, keyword.operator | #e783d8 | — |
| string, string.quoted.double, string.quoted.single | #7fd0c4 | — |
| comment, punctuation.definition.comment | #464b55 | italic |
| constant.numeric, constant.language, constant.character | #f78c6c | — |
| entity.name.tag.html, entity.name.tag.js.jsx, entity.name.tag.tsx, punctuation.definition.tag, entity.name.tag | #ff5370 | italic |
| entity.other.attribute-name.html, entity.other.attribute-name.jsx, entity.other.attribute-name.tsx, entity.other.attribute-name | #c3a6ff | — |
| punctuation.definition.tag.begin, punctuation.definition.tag.end, punctuation.definition.tag.jsx, punctuation.definition.tag.tsx, punctuation.definition.tag.fragment | #4a4d56 | — |
| support.class.component.jsx, support.class.component.tsx, entity.name.type.jsx, entity.name.type.tsx | #82aaff | italic bold |
| support.type.property-name, support.type.property-name.json | #ff9cac | — |
| punctuation.separator.key-value | #e783d8 | — |
| punctuation.separator.comma | #89ddff | — |
| punctuation.definition.block, punctuation.definition.array | #89ddff | — |
| support.function | #82aaff | |
| support.class, entity.name.class, entity.name.type.class | #ffcb6b | italic |
| meta.object-literal.key | #ff9cac | — |
| support.type.property-name, support.type.property-name.json | #ff9cac | — |
| string.quoted.double.json, string.quoted.single.json | #7fd083 | — |
| punctuation.separator.key-value.json | #e783d8 | — |
| punctuation.separator.comma.json | #89ddff | — |
| punctuation.definition.dictionary.begin.json, punctuation.definition.dictionary.end.json, punctuation.definition.array.begin.json, punctuation.definition.array.end.json | #89ddff | — |
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}!`;
}