Primer Theme
Publisher: Jeremy BoldingThemes in package: 3
A port of the Sublime Text Plugin "Theme - Primer".
A port of the Sublime Text Plugin "Theme - Primer".
Full workbench mockup using this variant's colors and tokenColors.
Loading...
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #95A2BB | — |
| text, source | #333333 | — |
| variable.parameter.function | #333333 | — |
| comment, punctuation.definition.comment | #969696 | — |
| punctuation.definition.string, punctuation.definition.variable, punctuation.definition.string, punctuation.definition.parameters, punctuation.definition.string, punctuation.definition.array | #173591 | — |
| none | #333333 | — |
| keyword.operator | #333333 | — |
| keyword | #A71D5D | — |
| variable | #ED6A43 | — |
| entity.name.function, meta.require, support.function.any-method | #795DA3 | — |
| support.class, entity.name.class, entity.name.type.class | #0086B3 | — |
| meta.class | #333333 | — |
| keyword.other.special-method | #795DA3 | — |
| storage | #A71D5D | — |
| support.function | #795DA3 | — |
| string, constant.other.symbol, entity.other.inherited-class | #183691 | — |
| constant.numeric | #0086B3 | — |
| none | #0086B3 | — |
| none | #795DA3 | — |
| constant | #795DA3 | — |
| entity.name.tag | #ED6A43 | — |
| entity.other.attribute-name | #795DA3 | — |
| entity.other.attribute-name.id, punctuation.definition.entity | #795DA3 | — |
| meta.selector | #A71D5D | — |
| none | #795DA3 | — |
| markup.heading punctuation.definition.heading, entity.name.section | #795DA3 | — |
| keyword.other.unit | #5C9966 | — |
| markup.bold, punctuation.definition.bold | #795DA3 | bold |
| markup.italic, punctuation.definition.italic | #A71D5D | italic |
| markup.raw.inline | #183691 | — |
| string.other.link | #ED6A43 | — |
| meta.link | #795DA3 | — |
| markup.list | #ED6A43 | — |
| markup.quotes | #795DA3 | — |
| meta.separator | #333333 | — |
| markup.inserted | #A1DF8A | — |
| markup.deleted | #EB5368 | — |
| markup.changed | #F0C36F | — |
| markup.ignored | #565656 | — |
| markup.untracked | #565656 | — |
| constant.other.color | #BF5656 | — |
| string.regexp | #795DA3 | — |
| constant.character.escape | #795DA3 | — |
| punctuation.section.embedded, variable.interpolation | #ab7967 | — |
| invalid.illegal | #14171A | — |
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}!`;
}