Panic Theme
Publisher: fdidronThemes in package: 1
A theme based on the hyperpanic color scheme https://www.npmjs.com/package/hyperpanic
A theme based on the hyperpanic color scheme https://www.npmjs.com/package/hyperpanic
Full workbench mockup using this variant's colors and tokenColors.
Loading...
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #F8F7F1 | — |
| comment | #6391BF | — |
| string | #FECB57 | — |
| constant.numeric | #AE81FF | — |
| constant.language | #AE81FF | — |
| constant.character, constant.other | #AE81FF | — |
| variable | #F8F7F1 | |
| keyword | #FF43A1 | — |
| storage | #FF43A1 | |
| storage.type | #73D5E9 | italic |
| entity.name.class | #40EA37 | underline |
| entity.other.inherited-class | #40EA37 | italic underline |
| entity.name.function | #40EA37 | |
| variable.parameter | #FF5E00 | italic |
| entity.name.tag | #FF43A1 | |
| entity.other.attribute-name | #40EA37 | |
| support.function | #73D5E9 | |
| support.constant | #73D5E9 | |
| support.type, support.class | #73D5E9 | italic |
| support.other.variable | — | #AE81FF |
| invalid | #F8F8F0 | |
| invalid.deprecated | #F8F8F0 | — |
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}!`;
}