ZS Theme
Publisher: zhang-saiThemes in package: 2
A pretty vscode theme for JSer/TSer
A pretty vscode theme for JSer/TSer
Full workbench mockup using this variant's colors and tokenColors.
Loading...
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #D6ECF0 | — |
| comment | #798188 | |
| string.quoted.double.block.python | #798188 | — |
| entity.name.tag, support.class.component | #f47171 | bold |
| meta.jsx.js, text.html.basic, meta.jsx.children, text.html.derivative | #f4a9de | — |
| entity.other.attribute-name.html, entity.other.attribute-name.jsx, entity.other.attribute-name.ts, entity.other.attribute-name.tsx | #7DDCF5 | — |
| punctuation.definition.tag.end, punctuation.definition.tag.begin, punctuation.definition.tag | #FFFBDE | — |
| declaration.tag, declaration.tag entity, meta.tag, meta.tag entity | #FFC64B | — |
| constant.character.entity.html | #F1E94B | — |
| meta.selector.css entity.name.tag | #f5f080 | — |
| meta.selector.css entity.other.attribute-name.id | #FFB454 | bold |
| entity.other.attribute-name.class, entity.other.attribute-name.parent-selector.css | #b6d877 | bold |
| support.type.property-name.css | #72AACA | normal |
| meta.property-group support.constant.property-value.css, meta.property-value support.constant.property-value.css | #F6F080 | — |
| meta.property-value support.constant.named-color.css, meta.property-value constant | #F6F080 | — |
| keyword.other | #ffa631 | underline bold |
| variable.other.less, entity.other.less.mixin | #b6d877 | — |
| source.css.less keyword.unit.css | #EB939A | — |
| meta.at-rule.media | #ffc773 | — |
| constant | #B8D977 | — |
| storage.type, keyword.control, keyword.generator, storage.modifier, keyword.operator.new | #FFC773 | bold |
| entity.name.function | #7DDCF5 | — |
| variable.parameter | #C0EBD7 | underline italic |
| entity.name.type.class, entity.other.inherited-class | #7DDCF5 | bold |
| , meta.function-call entity.name.function | #FFAFAF | — |
| meta.function-call support.function | #FEAB8D | bold |
| meta.function-call variable.language.super | #FEAB8D | bold italic |
| entity.name.type, support.type.builtin, support.type.primitive | #B1A5DEC7 | — |
| string, punctuation.definition.string | #BBFFAA | — |
| support.class.builtin, support.class.promise | #72AACA | bold |
| meta.function, punctuation.definition.group, meta.brackets, meta.property.object.js, punctuation.definition.group.js, punctuation.definition.parameters, meta.group.braces.square.js, meta.brace.round, meta.group.braces.round, punctuation.definition.block, meta.brace.square, punctuation.section.embedded, meta.brace.curly.begin.js, meta.brace.curly.end.js, meta.embedded.expression.jsx, punctuation.definition.brackets.js, punctuation.terminator.statement.js, punctuation.accessor.js, meta.block.ts punctuation.terminator.statement.ts, meta.block.tsx punctuation.terminator.statement.tsx, meta.var.expr.ts support.variable.property.ts, meta.var.expr.tsx support.variable.property.tsx, punctuation.definition.binding-pattern | #D6ECF0 | normal |
| punctuation.separator, punctuation.accessor, punctuation.destructuring | #D6ECF0 | normal |
| punctuation.accessor.optional | #FFC64B | — |
| keyword | #FFC64B | bold |
| meta.object-literal.key, variable.object.property | #D6ECF0 | — |
| variable.other | #d7ffd7 | — |
| variable.language, support.variable.property | #C0EBD7 | bold italic |
| string constant | #B7D877 | — |
| string.regexp | #7FECAD | — |
| keyword.control.anchor.regexp | — | |
| punctuation.definition.group.assertion.regexp | #7FECAD | — |
| punctuation.definition.group.regexp | #7DDCF5 | — |
| support.type.property-name.json | #7FECAD | normal |
| other.preprocessor.c | #8996A8 | — |
| other.preprocessor.c entity | #AFC4DB | — |
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}!`;
}