Snz's Theme
Publisher: Jiaxin Guo (郭佳鑫)Themes in package: 1
Snz's dark theme for Python, C++, Go, and JavaScript.
Snz's dark theme for Python, C++, Go, and JavaScript.
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 | #6a9955 | — |
| entity.name.type, meta.head.struct.cpp, variable.parameter.definition.label.latex, constant.other.reference.label.latex, constant.other.reference.citation.latex | #49d8bb | — |
| storage.type.string, constant.language, storage.type.built-in, storage.type.numeric, storage.type.string.go, storage.type.error.go, entity.name.type.comparable.go, storage.type.integral, support.type.built-in.posix-reserved, storage.type.boolean.go, support.type.primitive, support.type.builtin | #4d9fe3 | — |
| string.quoted, string.unquoted, string.regexp.quoted, support.type.property-name, string.regexp.character-class, string.template.js, string.regexp.js | #ce9178 | — |
| meta.function-call.generic, entity.name.function.support, entity.name.function.call, entity.name.function.member, support.function, keyword.operator.negation.regexp, keyword.other.unit.user-defined, constant.other.math.tex, punctuation.definition.quote.begin.markdown, punctuation.definition.markdown, fenced_code.block.language.markdown, entity.name.function.js, entity.name.function.ts | #e4e0ac | — |
| keyword.operator.comparison, keyword.operator.assignment.python, keyword.operator.arithmetic, keyword.operator.logical.go, keyword.operator.logical.cpp, keyword.operator.logical.js, keyword.operator.logical.ts, keyword.operator.increment, keyword.operator.decrement, keyword.operator.bitwise, punctuation.separator.pointer-access, keyword.operator.pointer, keyword.operator.shell, punctuation.separator.statement, keyword.operator.pipe, keyword.operator.logical.shell, punctuation.separator.dot-access, punctuation.math.operator.tex | #ffffff | — |
| keyword.control, keyword.operator.logical.python, entity.name.function.support.builtin, keyword.package, keyword.type, keyword.struct, keyword.function, keyword.interface, keyword.map, keyword.const, keyword.var, keyword.other, storage.modifier, keyword.operator.new, storage.type.class, storage.type.modifier, keyword.operator.delete, keyword.operator.sizeof, keyword.operator.cast, storage.type.struct, storage.type.template.cpp, keyword.operator.noexcept, storage.type.function, keyword.operator.ellipsis, keyword.operator.redirect, storage.type.string, support.function.builtin, keyword.operator.unpacking, keyword.operator.address, punctuation.definition.range, punctuation.terminator.go, keyword.channel.go, keyword.operator.channel.go, storage.type.enum.cpp, storage.type.enum.enum-key.class.cpp, entity.other.attribute, meta.encoding.cpp, keyword.operator.alignof.cpp, storage.type.union.cpp, storage.type.template.argument.class.cpp, keyword.operator.typeid.cpp, keyword.operator.wordlike.cpp, storage.type.asm.cpp, punctuation.vararg-ellipses, storage.type.number.python, storage.type.imaginary.number.python, support.type.python, storage.type.js, storage.type.numeric.bigint.js, storage.type.property.js, variable.language.super.js, keyword.operator.rest.js, keyword.operator.expression, keyword.operator.spread.js, keyword.go.mod, go.sum, constant.character.math.tex, keyword.command, storage.type.ts, keyword.operator.optional.ts | #C88CDC | — |
| variable.upper-case, entity.name.other.preprocessor.macro.predefined, entity.other.attribute-name.pragma.preprocessor, support.variable.magic, constant.other.placeholder, punctuation.definition.list, punctuation.definition.block.sequence.item, keyword.operator.quantifier.regexp, keyword.operator.disjunction.regexp, support.other.parenthesis, keyword.operator.pattern.case.default.shell, punctuation.separator.regex.alternation, punctuation.definition.regex.arbitrary-repetition, keyword.operator.redirect.stderr, keyword.operator.redirect.stdout, variable.other.constant, variable.other.enummember, storage.type.format, constant.other.character-class.regexp, constant.character.format.placeholder.other | #4ec6ff | — |
| markup.heading, punctuation.character.set, punctuation.definition.character-class | #4ec6ff | bold |
| variable.parameter.capture.cpp | — | underline |
| variable.other.import, entity.name.namespace, entity.name.scope-resolution, entity.name.type.package, support.class.latex | #ff9696 | italic |
| constant.character.escape, constant.other.option, entity.name.tag, support.type.property-name, variable.parameter.function-call, variable.parameter.function | #ff9696 | — |
| constant.numeric.decimal, constant.numeric.exponent, constant.numeric.hexadecimal, constant.numeric.integer, constant.numeric.json, constant.numeric.dec, constant.numeric.float, constant.numeric.octal, constant.numeric.binary, constant.numeric.hex, constant.numeric.oct, constant.numeric.bin, meta.diff.index.git, meta.toc-list.line-number | #b8dbb4 | — |
| variable.other.property, entity.other.attribute-name, variable.other.declare, variable.object.property, support.function.key.bibtex, markup.inline.raw.string.markdown, meta.attribute.python, variable.other.object.property | #a0e1ff | — |
| entity.name.function.definition, punctuation.definition.subshell, punctuation.definition.evaluation, entity.name.function.shell, keyword.operator.expansion.shell, punctuation.separator.statement.background, meta.diff.header.git, entity.name.operator.custom-literal, entity.name.function.member.cpp | #ffc86e | — |
| meta.preprocessor.macro, variable.language.this, entity.name.function.preprocessor, variable.other.dockerfile, variable.other.normal.shell, variable.language.special.shell, punctuation.definition.variable.shell, variable.parameter.positional, support.other.escape.special.regexp, variable.language.special.wildcard.shell, constant.other.general.math.tex, variable.parameter.batchfile | #94558d | — |
| constant.character.escape.line-continuation, punctuation.separator.parameters.cpp, variable.parameter.js, storage.type.function.arrow.js | #bbbbbb | — |
| support.other.match | #839496 | — |
| markup.deleted, meta.diff.header.from-file | #ff5c7c | — |
| markup.inserted, markup.changed, meta.diff.header.to-file | #96BE78 | — |
| markup.italic.markdown, markup.italic.textit.latex | — | italic |
| markup.bold.markdown, markup.bold.textbf.latex, entity.name.section.latex, variable.other.label.go | — | bold |
| string.other.link.title.markdown | #99C3FF | underline |
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}!`;
}