Trailscasts
Publisher: M.K. SafiThemes in package: 1
Like Railscasts but more vibrant and consistent
Like Railscasts but more vibrant and consistent
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 |
|---|---|---|
| — | #E6E1DC | — |
| variable, markup.underline, meta.property-value support, meta.property-value constant | #98CDCD | — |
| string, constant.numeric, markup.inline.raw | #A5C261 | — |
| keyword, storage, constant.language, variable.language.this, text.html.markdown meta.paragraph punctuation, text.html.markdown markup.heading punctuation | #FF9945 | — |
| variable.parameter | #FFFFFF | underline |
| meta.tag, meta.tag support, meta.function-call, entity.name.function, support.function, meta.selector entity, meta.selector entity, entity.name.tag.css, entity.other.attribute-name | #E8BF6A | — |
| meta.brace.round, meta.jsx.children, punctuation | #FFFFFF | — |
| meta.definition.property entity.name.function, meta.definition.method entity.name.function | #C0C05C | underline |
| meta, variable.other.property, constant, support, punctuation.definition.block.tag.jsdoc, storage.type.class.jsdoc | #D0D0FF | — |
| comment, punctuation.definition.comment | #BC9458 | italic |
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}!`;
}