Thrust Theme
Publisher: James ThurleyThemes in package: 12
Thrust, a theme for Rust.
Thrust, a theme for Rust.
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 |
|---|---|---|
| variable.language.self, variable.language.special.self, variable.language.this, keyword.other.this, variable.language.super | #FFACBD | italic bold |
| entity.name.tag, keyword.operator.expression, keyword.operator.new, keyword.operator.wordlike, keyword.type.elm, keyword.type.go, source keyword, keyword.operator.logical.python, keyword.operator.in, punctuation.definition.heading, storage.modifier, storage.type.class, storage.type.enum, storage.type.function.python, storage.type.function.ts, storage.type.function, storage.type.interface.ts, storage.type.js, storage.type.local.java, storage.type.def.groovy, storage.type.namespace, storage.type.property, storage.type.rust, storage.type.struct, storage.type.ts, storage.type.type | #E8DD66 | bold |
| constant.numeric, keyword.other.unit | #FFACBD | — |
| constant.character, punctuation.definition.char, punctuation.definition.string, string | #CEEFFF | — |
| variable | #E4E5E1 | — |
| variable.other.enummember | #4377CD | — |
| constant, entity.name.constant, variable.other.metavariable, support.constant | #4377CD | — |
| entity.name.function, entity.name.function.member, support.function, entity.other.attribute-name.table.toml, entity.other.attribute-name.table.array.toml, entity.name.function-call, meta.function-call, meta.function-call.generic.python | #FFFED9 | — |
| entity.name.type, entity.name.type.*, storage.type, support.class, support.type | #AAAAE7 | — |
| keyword.type, storage.type.boolean.go, storage.type.built-in, storage.type.byte.go, storage.type.error.go, storage.type.numeric.go, storage.type.primitive, storage.type.rune.go, storage.type.string.go, storage.type.uintptr.go, support.type, variable.other.metavariable.specifier | #9494CF | — |
| entity.name.type.parameter, variable.type | #AAAAE7 | italic |
| entity.name.field, entity.name.record.field, entity.name.variable.field, meta.attribute.python, punctuation.support.type.property-name, support.type.property-name, support.type.vendored.property-name, variable.other.member, variable.other.object.property, variable.other.property | #E4E5E1 | — |
| entity.name.tag.toml, entity.name.tag.yaml | #E4E5E1 | |
| entity.name.module, entity.name.namespace, entity.name.type.namespace, storage.modifier.import, storage.modifier.package, support.module, entity.name.type.module, variable.other.constant.elixir | #C8C9C5 | — |
| entity.name.function.macro, entity.name.macro, entity.name.other.preprocessor.macro, variable.other.readwrite.module.elixir, punctuation.definition.variable.elixir | #C8C9C5 | — |
| storage.modifier.lifetime.rust, entity.name.lifetime.rust, entity.name.type.lifetime, punctuation.definition.lifetime | #E8DD66 | italic |
| constant.character.escape | #3366BB | — |
| constant.character.format.placeholder, constant.other.placeholder, punctuation.section.embedded, punctuation.definition.template-expression | #3366BB | — |
| source comment, punctuation.definition.comment | #5C945E | — |
| comment.line.documentation, comment.block.documentation | #6FA871 | — |
| entity.name.function.decorator, punctuation.brackets.attribute, punctuation.definition.annotation, punctuation.definition.attribute, punctuation.definition.decorator, storage.modifier.attribute, storage.type.annotation | #3366BB | — |
| entity.other.attribute-name.class, entity.other.attribute-name.id | #00A5B6 | — |
| keyword.other.unsafe | #A54446 | — |
| keyword.operator.logical.rust, keyword.operator, storage.modifier.pointer, storage.type.function.arrow, punctuation, keyword.control.flow.block-scalar.literal.yaml, meta.brace.round.ts | #FFFC9D | |
| markup.italic | — | italic |
| markup.bold | — | bold |
| markup.heading | — | bold |
| punctuation.definition.markdown, punctuation.definition.heading.markdown, punctuation.definition.metadata.markdown, punctuation.definition.raw.markdown, punctuation.definition.constant.markdown, punctuation.definition.constant.begin.markdown, punctuation.definition.constant.end.markdown, punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.list.begin.markdown, punctuation.definition.quote.begin.markdown, punctuation.definition.bold.markdown, punctuation.definition.italic.markdown, punctuation.separator.key-value.markdown, punctuation.separator.key-value.markdown, fenced_code.block.language.markdown, constant.other.reference.link.markdown, meta.link.inline.markdown, meta.link.reference.def.markdown, punctuation.definition.asciidoc, punctuation.separator.asciidoc, support.asciidoc, markup.heading.asciidoc, markup.heading.marker.asciidoc, markup.list.bullet.asciidoc, markup.link.asciidoc, markup.other.url.asciidoc, markup.other.anchor.asciidoc, support.constant.asciidoc, constant.asciidoc, entity.name.function.asciidoc | #6FA871 | — |
| string.other.link.title.markdown, string.other.link.description.markdown, string.unquoted.asciidoc | #E4E5E1 | — |
| markup.inserted, punctuation.definition.inserted.diff | #85BF86 | — |
| markup.deleted, punctuation.definition.deleted.diff | #CC6666 | — |
| markup.changed | #EE9944 | — |
| punctuation.definition.range.diff, meta.diff.range | #3366BB | — |
| comment.line.number-sign.git-commit, punctuation.definition.comment.git-commit, meta.diff.index, meta.diff.header | #3B3B3B | — |
| meta.diff.header.to-file, meta.diff.header.from-file | #FBFCF9 | bold |
| punctuation.definition.from-file.diff, punctuation.definition.to-file.diff | #00BBCC | — |
| meta.mutable | — | underline |
| magit.header | #FFFF53 | bold |
| magit.subheader | — | bold |
| magit.entity | #5F5F5F | — |
| invalid.deprecated.line-too-long.git-commit | #EE9944 | — |
| invalid.illegal.line-too-long.git-commit | #CC6666 | — |
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}!`;
}