Srcery (official port)
Publisher: srcery-colorsThemes in package: 1
Srcery theme based on the srcery-colors themes
Srcery theme based on the srcery-colors themes
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 |
|---|---|---|
| — | #fce8c3 | — |
| comment | #75715E | — |
| string | #fbb829 | — |
| constant.numeric | #0aaeb3 | — |
| constant.language | #0aaeb3 | — |
| constant.character, constant.other | #0aaeb3 | — |
| variable | #9ebac2 | — |
| keyword | #ef2f27 | — |
| storage | #ef2f27 | |
| storage.type | #2c78bf | italic |
| entity.name.class | #519f50 | underline |
| entity.other.inherited-class | #519f50 | italic underline |
| entity.name.function | #519f50 | |
| variable.parameter | #2c78bf | italic |
| entity.name.tag | #ef2f27 | |
| entity.other.attribute-name | #519f50 | |
| support.function | #2c78bf | |
| support.constant | #2c78bf | |
| support.type, support.class | #2c78bf | italic |
| support.other.variable | — | |
| invalid | #F8F8F0 | |
| invalid.deprecated | #F8F8F0 | — |
| entity.name.section.markdown | #ef2f27 | — |
| punctuation.definition.heading.markdown | #ef2f27 | — |
| punctuation.definition.quote.begin.markdown | #fbb829 | — |
| punctuation.definition.list.begin.markdown | #2c78bf | — |
| beginning.punctuation.definition.list.markdown | #ef2f27 | — |
| markup.inline.raw.string.markdown | #fbb829 | — |
| markup.italic.markdown | #68a8e4 | italic |
| markup.bold.markdown | #519f50 | bold |
| meta.diff, meta.diff.header | #2c78bf | italic |
| markup.deleted | #ef2f27 | — |
| markup.changed | #f75341 | — |
| markup.inserted | #519f50 | — |
| punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded | #2c78bf | — |
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}!`;
}