Rusty Colors
Publisher: IoaNNUwUThemes in package: 1
Dark theme with old rusty colors, perfect to use with Rust language
Dark theme with old rusty colors, perfect to use with Rust language
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 |
|---|---|---|
| source, punctuation.brackets.round, keyword.operator.namespace, punctuation.brackets.angle, punctuation.brackets.curly, punctuation.brackets.square, keyword.operator.access, variable, keyword.operator.key-value.rust, punctuation.section.block, punctuation.section.parameters, punctuation.section, meta.bracket.square, punctuation.definition.capture, punctuation.definition.parameters, meta.block.cpp, punctuation.separator.namespace.access.cpp, meta.body.function.definition.cpp, meta.body.class.cpp, meta.parameter, punctuation.separator.namespace.access.cpp, punctuation.separator.initializers.cpp, punctuation.separator.colon.range-based.cpp, punctuation.separator.dot-access.cpp, punctuation.separator.delimiter.comma.template.argument.cpp, punctuation.accessor, keyword.operator.type.annotation.ts, meta.property-list.css, punctuation.definition.arguments, meta.function-call.arguments.python, entity.name.command.shell, punctuation.separator.java, meta.definition.function.body.swift, meta.function-call.swift | #bbb | — |
| entity.name.operator.cpp | #DE8373 | bold italic |
| storage.type, keyword.other, keyword.operator.range, keyword.operator.arrow.skinny, keyword.operator.logical, keyword.operator.math, punctuation.semi, punctuation.comma, entity.name.type.numeric, entity.name.type.primitive, keyword.operator.borrow, storage.modifier.mut.rust, variable.language.super.rust, entity.name.function.macro.rules.rust, variable.other.metavariable.specifier.rust, constant.character.escape, string.quoted.byte.raw.rust, punctuation.section.embedded.rust, keyword.control.cpp, variable.language.this.cpp, storage.modifier.reference.cpp, keyword.operator.bitwise.cpp, storage.modifier.specifier, punctuation.terminator, keyword.control, constant.language, storage.modifier, entity.name.function.preprocessor.c, keyword.operator.assignment.cpp, keyword.operator.arithmetic.cpp, keyword.operator.comparison.cpp, storage.type.built-in.cpp, support.type.swift, keyword.type.int.cs, keyword.type.string.cs, keyword.type.void.cs, keyword.type.double.cs, keyword.type.float.cs, keyword.type.decimal.cs, keyword.type.char.cs, keyword.type.ulong.cs, keyword.type.long.cs, keyword.type.uint.cs, keyword.type.ushort.cs, keyword.type.short.cs, keyword.type.sbyte.cs, keyword.type.byte.cs, keyword.type.bool.cs, keyword.hard, keyword.operator.arithmetic, keyword.operator.bitwise, entity.name.function.operator.cpp, punctuation.separator.pointer-access, punctuation.separator.delimiter.c, punctuation.separator.delimiter.comma.cpp, keyword.operator., support.type.primitive.ts, punctuation.definition.template-expression, meta.property-name.css, meta.property-list.css, punctuation.definition.entity.css, punctuation.separator.key-value.html, constant.character.entity.xml, keyword.const.go, keyword.function.go, keyword.package.go, keyword.go.mod, keyword.var.go, keyword.import.go, keyword.type.go, keyword.struct.go, keyword.interface.go, keyword.channel.go, constant.character.format.placeholder, punctuation.section.function.begin.python, punctuation.separator.colon.python, punctuation.definition.subshell.single.shell, punctuation.definition.assignment, punctuation.separator.batchfile, punctuation.definition.variable.shell, variable.parameter.positional.shell, variable.language.special.shell, constant.other.option.shell | #d9a958 | — |
| comment | #5fc26e | — |
| string.quoted, punctuation.definition.string.template, string.template | #c2915f | — |
| meta.attribute, storage.type.annotation | #d4d4d4 | — |
| meta.function.definition, entity.name.type.struct, entity.name.type.class, entity.name.type.rust, entity.name.function.definition.cpp, entity.name.type.parameter.cpp, support.type.posix-reserved.c, entity.name.function.member.cpp, meta.function.definition.parameters.c, meta.declaration.type.alias.cpp, entity.name.type.cs, entity.name.function.cs, storage.type.generic.java, storage.type.object.array.java, entity.name.type.declaration.rust, storage.type.java, entity.name.type.kotlin, meta.definition.function, meta.definition.method, entity.name.tag, entity.name.type.ts, entity.name.type.alias.ts, entity.other.attribute-name.class.css, support.type.property-name.table.toml, support.type.property-name.array.toml, heading, entity.name.function.go, entity.name.type.go, entity.name.type.receiver.go, entity.name.class.message.proto, entity.name.class.proto, entity.name.function.python, entity.name.function.shell, keyword.command.batchfile | #de8373 | — |
| support.variable.magic.python, support.function.magic.python, entity.name.function.constructor.cpp | #de8373 | bold italic |
| constant.numeric.decimal, constant.numeric | #69b6ba | — |
| entity.name.namespace, entity.name.module.rust, string.quoted.other.lt-gt.include.cpp, entity.name.scope-resolution.cpp, entity.name.scope-resolution.function.call.cpp, entity.name.scope-resolution.parameter.cpp, meta.preprocessor.include.cpp, entity.name.type.namespace.cs, storage.modifier.import.java, markup.underline.link.markdown, markup.underline.link.image.markdown, entity.name.package.go | #70a9b9 | — |
| entity.name.type.template.cpp, meta.template.call.cpp, variable.language.generic-parameter.swift | #57bdbb | — |
| meta.function.call, entity.name.function.call, entity.name.function.member.cpp, entity.name.function.cs, entity.name.function.java, entity.name.function.declaration.kotlin, meta.function-call, entity.other.attribute-name.pseudo-class.css, string.other.link.title.markdown, string.other.link.description.markdown, support.function.go, entity.name.command.shell, support.function.swift | #7cc2d5 | — |
| entity.name.function.preprocessor.cpp, support.function.misc.css | #7b97d2 | — |
| entity.name.function.macro.rust, variable.other.metavariable.name.rust | #6797ff | — |
| variable.constant.other, constant.other.caps, variable.other.global.cpp, entity.name.function.preprocessor.c | #7b97d2 | — |
| variable.other.property, support.variable.property, entity.other.attribute-name, entity.name.variable.property.cs, variable.other.object.property, support.type.property-name.css, support.type.property-name.json, support.type.property-name.toml, markup.inline.raw.string.markdown, string.unquoted.go.mod, variable.other.proto, support.other.proto, meta.attribute.python, variable.other.readwrite.batchfile, punctuation.definition.variable.batchfile, variable.other.normal.shell, variable.other.assignment.shell | #95acbd | — |
| variable.language.self.rust, variable.language.this, variable.parameter.function.language.special.self.python, variable.language.special.self.python | #91a4d0 | — |
| markup.bold.markdown | — | bold |
| markup.italic.markdown | — | italic |
| entity.name.type.trait.rust, entity.name.type.interface.cs, punctuation.definition.annotation | #82c67c | — |
| punctuation.definition.lifetime.rust, entity.name.type.lifetime.rust | #798fde | — |
| entity.name.type.option.rust, entity.name.variable.enum-member, constant.other.enum.java, variable.other.enummember.swift | #91a4d0 | — |
| entity.name.type.enum | #6ec0d9 | — |
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}!`;
}