Railscasts Pro
Publisher: codeMusterThemes in package: 1
A dark UI theme based on the original Textmate RailsCasts Theme.
A dark UI theme based on the original Textmate RailsCasts Theme.
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 | — |
| source | — | — |
| comment | #BC9458 | italic |
| keyword, storage | #CC7833 | |
| entity.name.function, keyword.other.name-of-parameter.objc | #FFC66D | |
| entity.name | #ffffff | — |
| entity.name.type.class | #e68484 | italic |
| constant.numeric | #A5C261 | |
| variable.other.readwrite | #ccccfa | |
| variable.other.block, variable.other.readwrite.instance.ruby, variable.other.ruby | #ccccfa | — |
| constant | #4dadc5 | |
| variable.other.constant | #DA4939 | — |
| constant.language | #4dadc5 | |
| string | #A5C261 | |
| support.function | #DA4939 | |
| support.type | #4dadc5 | — |
| support.constant | #A5C261 | — |
| entity.other.attribute-name | #e893c2 | italic |
| meta.tag, declaration.tag, entity.name.tag.html | #ffffff | |
| punctuation.definition.tag | #E8BF6A | |
| invalid | #FFFFFF | — |
| constant.character.escaped, constant.character.escape, string source, string source.ruby | #519F50 | |
| markup.inserted | #E6E1DC | — |
| markup.deleted | #E6E1DC | — |
| meta.diff.header, meta.separator.diff, meta.diff.index, meta.diff.range | — | — |
| todo.category.name | #E8BF6A | — |
| todo.task.urgent | #FEFF00 | — |
| todo.category.extras | #BC9458 | |
| todo.task.dormant | #807C79 | — |
| todo.task.complete | #DA4939 | — |
| todo.task.question | #82A7E2 | — |
| todo.task.large | #A5C261 | — |
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}!`;
}