RedPlanet
Publisher: devaioThemes in package: 1
A muted, martian theme for VS Code.
A muted, martian theme for VS Code.
Full workbench mockup using this variant's colors and tokenColors.
Loading...
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #C2B790 | — |
| comment | #676767 | |
| keyword | #8C3432 | |
| storage | #B55242 | |
| storage.type | #B55242 | italic |
| support.function | #869985 | |
| support.type.python | #A16550 | |
| support.type.class.python | #A16550 | |
| entity.name.class | #8C3432 | underline |
| constant.numeric | #C24D43 | |
| constant | #C24D43 | |
| constant.language | #DB592E | |
| variable.language, variable.other | #676767 | |
| string | #5b8390 | |
| constant.character.escape, string source | #E8BF6A | |
| meta.preprocessor | #896492 | |
| keyword.control.import | #877B4C | |
| entity.name.function | #855442 | |
| meta.item-access | #919191 | |
| entity.name.method | #855442 | |
| entity.name.type | #8C2723 | |
| support.function.magic.python | #728271 | |
| support.variable.magic.python | #728271 | |
| entity.other.inherited-class | #7A605D | |
| variable.parameter | #6d948D | |
| storage.type.method | #70727E | |
| storage.type.function | #70727E | |
| meta.section entity.name.section, declaration.section entity.name.section | #B9AA99 | |
| support.function | #C6C08E | |
| support.constant | #a94D37 | |
| support.variable | #fff | |
| keyword.operator.js | #D6D6D6 | — |
| invalid | #FFFFFF | — |
| invalid.deprecated.trailing-whitespace | #FFFFFF | — |
| text source, string.unquoted | #B9AA99 | — |
| text source string.unquoted, text source text source | #D6BFB8 | — |
| meta.tag.preprocessor.xml | #676767 | |
| meta.tag.sgml.doctype, meta.tag.sgml.doctype entity, meta.tag.sgml.doctype string, meta.tag.preprocessor.xml, meta.tag.preprocessor.xml entity, meta.tag.preprocessor.xml string | #676767 | |
| string.quoted.docinfo.doctype.DTD | #CC695F | |
| meta.tag, declaration.tag | #A87B60 | |
| entity.name.tag | #A87B60 | |
| entity.other.attribute-name | #60827E | |
| markup.heading | #EBEB91 | bold |
| markup.quote | #EBEB91 | |
| markup.list | #EBEB91 | — |
| markup.deleted.git_gutter | #F92672 | — |
| markup.inserted.git_gutter | #A6E22E | — |
| markup.changed.git_gutter | #967EFB | — |
| markup.ignored.git_gutter | #565656 | — |
| markup.untracked.git_gutter | #565656 | — |
| meta.selector.css entity.other.attribute-name.id | #6B84A3 | — |
| entity.other.attribute-name.class | #38add8 | — |
| entity.other.less.mixin | #38add8 | — |
| keyword.control.html.elements | #fc3 | — |
| meta.attribute-selector.css string | #FF950A | — |
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}!`;
}