CodinCat-theme
Publisher: CodinCatThemes in package: 3
An easy on eyes color scheme
An easy on eyes color scheme
Full workbench mockup using this variant's colors and tokenColors.
Loading...
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #938c6c | — |
| comment | #524f45ff | italic |
| string, support.constant.font-name | #50744cff | — |
| constant.numeric, keyword.other.unit | #4d708aff | — |
| constant.language, entity.other.attribute-name.id | #9f3232ff | bold |
| constant.character, constant.other | #7752b8ff | — |
| variable, support.constant.property-value.css | #7f6c33ff | — |
| keyword, support.type.property-name, meta.property-name, support.type.vendored.property-name | #9b5252ff | — |
| storage | #9b2828ff | bold |
| storage.type, entity.name.tag | #887720 | bold |
| entity.name.class | #a934b8ff | underline |
| entity.other.inherited-class | #7e7e7eff | italic underline |
| entity.name.function, entity.other.attribute-name.class | #81562dff | bold |
| variable.parameter | #538080ff | |
| entity.name.tag, punctuation.definition.tag | #477382ff | bold |
| entity.other.attribute-name | #907111ff | |
| support.function, meta.property-value, support.constant.property-value | #707e28ff | |
| support.constant, entity.other.attribute-name.pseudo-element | #9344a7 | |
| support.type, support.class | #815393ff | — |
| support.other.variable | — | |
| invalid | #aeaea3ff | |
| invalid.deprecated | #aeaea3ff | — |
| punctuation.terminator.rule, punctuation.separator.key-value | #938c6c | — |
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}!`;
}