XT Color theme
Publisher: xhi2artThemes in package: 1
Color theme for VSCode
Color theme for VSCode
Full workbench mockup using this variant's colors and tokenColors.
Loading...
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #ABB2BF | — |
| comment | #556177ff | italic |
| string | #8DD15C | — |
| constant.numeric | #FCA34F | — |
| constant.language | #F054E8 | italic |
| constant.character, constant.other | #80b55aff | italic |
| variable | #ffa34cff | |
| keyword | #CD71C2 | — |
| storage | #CD71C2 | italic |
| storage.type | #cd71c2ff | — |
| entity.name.class | #ECA542 | — |
| entity.other.inherited-class | #E66670 | italic |
| entity.name.function | #5BB0F5 | |
| variable.parameter | #A7BADF | — |
| entity.name.tag | #FFA34C | |
| entity.other.attribute-name | #E2BC83 | italic |
| support.function | #5BB0F5 | |
| support.constant | #FF3845 | |
| support.type, support.class | #E66670 | — |
| support.other.variable | #ffa34cff | |
| invalid | #f9f9efff | |
| invalid.deprecated | #482800ff | — |
| markup.quote | #ffe5b0ff | — |
| markup.bold, markup.italic | #ffe5b0ff | — |
| markup.inline.raw | #7278a1ff | |
| markup.heading.setext | #ffa34cff |
TypeScript sample highlighted with this variant's colors and tokenColors.
Loading...
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}!`;
}
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}!`;
}