Spring Theme
Publisher: geraneThemes in package: 1
Spring Theme ported from the Spring TextMate Theme
Spring Theme ported from the Spring TextMate Theme
Full workbench mockup using this variant's colors and tokenColors.
Loading...
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #484848 | — |
| keyword | #008000 | bold |
| variable | #4169e1 | bold |
| variable.other.property | — | bold |
| storage | #008000 | bold |
| storage.modifier | — | italic |
| storage.modifier.extends | — | bold |
| storage.modifier.implements | — | bold italic |
| constant | #daa520 | bold |
| constant.numeric | #2e8b57 | normal |
| constant.language | #2e8b57 | bold |
| constant.other | #484848 | bold |
| keyword.operator | #484848 | normal |
| support.class | #484848 | bold |
| support.class.implements | #484848 | bold italic |
| support.function.construct | #008000 | bold |
| meta.function.argument.typehinted | #484848 | normal |
| meta.function-call.object | #4169e1 | italic |
| meta.function-call.static | #4169e1 | italic |
| meta.function-call | #7c7c7c | bold |
| meta.class | — | bold italic |
| string | #dc143c | — |
| comment | #ff8c00 | — |
| keyword.other.phpdoc | #ff8c00 | — |
| entity.name.tag, punctuation.definition.tag | #008000 | — |
| entity.other.attribute-name | #dc143c | — |
| string.quoted.double.html, string.quoted.single.html | #1e90ff | — |
| keyword.doctype.xml, meta.tag.sgml.doctype.html | #008000 | bold |
| support.type.property-name.css | #1e90ff | — |
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}!`;
}