JMrad Theme
Publisher: Jason MradThemes in package: 2
Dark and Light VS Code theme set
Dark and Light VS Code theme set
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 |
|---|---|---|
| comment | #a19b8f | italic |
| string.quoted.double, string.quoted.single, string.constant, string.template, string.quoted.template | #8DDC8A | — |
| string.quoted.other, string support, string keyword | #9DCDF5 | — |
| entity.name.type, entity.name.namespace, storage.type.namespace.definition, entity.name.scope-resolution | #66B5F6 | — |
| punctuation.definition.template-expression, punctuation.section.embedded | #bb97e7 | — |
| constant.language, constant.other, support.constant | #66B5F6 | — |
| variable, variable.other, variable.parameter, variable.other.exported.go | #A8DEFF | — |
| keyword, keyword.operator.arithmetic.shell, storage, support.type.return, support.type.receiver | #eb7e81 | — |
| entity.name.class, entity.name.type.class, entity.name.type.interface, entity.section.ini, entity.name.section | #bb97e7 | — |
| entity.name.function, meta.function-call.generic, meta.function-call.object, meta.function-call.static, meta.function-call.ts | #bb97e7 | — |
| entity.name.tag, entity.tag.apacheconf | #66B5F6 | — |
| entity.other.attribute-name, entity.other.pseudo-element | #bb97e7 | — |
| support.type, support.other.namespace, support.class, source.js support.type, support.constant.color | #66B5F6 | — |
| constant.numeric, constant.character.entity | #66B5F6 | — |
| invalid | #fafbfc | — |
| meta.property-name.css, meta.property-value.css support, meta.property-value.css support.constant, meta.property-value.css | #66B5F6 | — |
| meta.property-value.css punctuation | #ffffff | — |
| string.quoted.single.dart, string.quoted.double.dart, punctuation.definition.string.begin.dart, punctuation.definition.string.end.dart | #8DDC8A | — |
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}!`;
}