Snappy Theme
Publisher: geraneThemes in package: 1
Snappy Theme ported from the Snappy TextMate Theme
Snappy Theme ported from the Snappy TextMate Theme
Full workbench mockup using this variant's colors and tokenColors.
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #e3e2e0 | — |
| comment | #696969 | — |
| string | #4ea1df | — |
| constant.numeric | #4ea1df | — |
| constant.language |
TypeScript sample highlighted with this variant's colors and tokenColors.
| — |
| constant.character, constant.other | #f66153 | — |
| variable | — |
| keyword | #f66153 | — |
| storage | #f66153 |
| storage.type | #4ea1df |
| entity.name.class | #f66153 | underline |
| entity.other.inherited-class | #f66153 | italic underline |
| entity.name.function | #808dd3 |
| variable.parameter | italic |
| entity.name.tag | #4ea1df |
| entity.other.attribute-name | #f66153 |
| support.function | #808dd3 |
| support.constant | #f66153 |
| support.type, support.class | #f66153 | italic |
| support.other.variable | — |
| invalid | #f8f8f0 |
| invalid.deprecated | #f8f8f0 | — |
| meta.structure.dictionary.json string.quoted.double.json | #4ea1df | — |
| meta.diff, meta.diff.header | #75715E | — |
| markup.deleted | #00A8C6 | — |
| markup.inserted | #A6E22E | — |
| markup.changed | #E6DB74 | — |
| constant.numeric.line-number.find-in-files - match | #8FBE00A0 | — |
| entity.name.filename.find-in-files | #E6DB74 | — |
| keyword.other | #909090 | — |
| meta.property-value, support.constant.property-value, constant.other.color | #4ea1df | — |
| meta.structure.dictionary.json string.quoted.double.json | #f66153 | — |
| meta.structure.dictionary.value.json string.quoted.double.json | #4ea1df | — |
| meta.property-name support.type.property-name | — | normal |
| meta.property-value punctuation.separator.key-value | #e3e2e0 | — |
| keyword.other.use, keyword.other.function.use, keyword.other.namespace, keyword.other.new, keyword.other.special-method, keyword.other.unit, keyword.other.use-as | #4ea1df | — |
| meta.use support.class.builtin, meta.other.inherited-class support.class.builtin | #e3e2e0 | normal |
| variable.other | normal |
| variable.parameter.function.coffee | #4ea1df | italic |
| entity.name.section.markdown | #f66153 | — |
| punctuation.definition.heading.markdown | #f66153 | — |
| markup.raw.inline.markdown | #4ea1df | — |
| punctuation.definition.bold.markdown, punctuation.definition.italic.markdown | #f66153 | — |
| punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown | #f66153 | — |
| punctuation.definition.metadata.markdown | #f66153 | — |
| markup.underline.link.markdown, markup.underline.link.image.markdown, meta.image.inline.markdown | #4ea1df | italic |
| markup.bold.markdown, markup.italic.markdown | #4ea1df | — |
| markup.italic.markdown | — | italic |
| markup.bold.markdown | — | bold |
| markup.raw.block.markdown | #00a8c6 | — |
| markup.deleted.git_gutter | #e61f44 | — |
| markup.inserted.git_gutter | #a7da1e | — |
| markup.changed.git_gutter | #f7b83d | — |
| entity.other.attribute-name.class.css | #808dd3 | — |
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}!`;
}