RailsCasts
Publisher: Dmitry DemenchukThemes in package: 1
Dark UI theme for Visual Studio Code based on Ryan Bates (@rbates) RailsCasts TextMate theme.
Dark UI theme for Visual Studio Code based on Ryan Bates (@rbates) RailsCasts TextMate theme.
Full workbench mockup using this variant's colors and tokenColors.
Loading...
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #E6E1DC | — |
| source.ruby.embedded, source.ruby.rails.embedded | — | — |
| comment | #BC9458 | italic |
| keyword, storage | #CC7833 | |
| entity.name.function, keyword.other.name-of-parameter.objc | #FFC66D | |
| entity.name | #FFFFFF | — |
| constant.numeric | #A5C261 | |
| constant.numeric | #A5C261 | — |
| none | #A5C261 | — |
| none | #6D9CBE | — |
| variable | #D0D0FF | |
| variable.other.block | #E6E1DC | — |
| constant | #6D9CBE | |
| variable.other.constant | #DA4939 | — |
| constant.language | #6E9CBE | |
| string | #A5C261 | |
| support.function | #DA4939 | |
| support.type | #6E9CBE | — |
| support.constant | #A5C261 | — |
| meta.tag, declaration.tag, entity.other.attribute-name | #E8BF6A | |
| entity.name.tag | #ffffff | — |
| 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 | — | — |
| markup.deleted | #F92672 | — |
| markup.inserted | #A6E22E | — |
| markup.changed | #967EFB | — |
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}!`;
}