Trae Theme
Publisher: yoy0721Themes in package: 2
Trae's Dark and Light Theme for VS Code
Trae's Dark and Light Theme for VS Code
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 |
|---|---|---|
| entity.name.function, support.function, support.constant.handlebars, source.powershell variable.other.member, entity.name.operator.custom-literal | #4078F2 | — |
| support.class, support.type, entity.name.type, entity.name.namespace, entity.other.attribute, entity.name.scope-resolution, entity.name.class, storage.type.numeric.go, storage.type.byte.go, storage.type.boolean.go, storage.type.string.go, storage.type.uintptr.go, storage.type.error.go, storage.type.rune.go, storage.type.cs, storage.type.generic.cs, storage.type.modifier.cs, storage.type.variable.cs, storage.type.annotation.java, storage.type.generic.java, storage.type.java, storage.type.object.array.java, storage.type.primitive.array.java, storage.type.primitive.java, storage.type.token.java, storage.type.groovy, storage.type.annotation.groovy, storage.type.parameters.groovy, storage.type.generic.groovy, storage.type.object.array.groovy, storage.type.primitive.array.groovy, storage.type.primitive.groovy | #B15EF2 | — |
| meta.type.cast.expr, meta.type.new.expr, support.constant.math, support.constant.dom, support.constant.json, entity.other.inherited-class | #5F36B2 | — |
| keyword.control, source.cpp keyword.operator.new, source.cpp keyword.operator.delete, keyword.other.using, keyword.other.directive.using, keyword.other.operator, entity.name.operator | #5F36B2 | — |
| variable, meta.definition.variable.name, support.variable, entity.name.variable, constant.other.placeholder | #C99100 | — |
| variable.other.constant, variable.other.enummember | #986801 | — |
| meta.object-literal.key | #17181A | — |
| support.constant.property-value, support.constant.font-name, support.constant.media-type, support.constant.media, constant.other.color.rgb-value, constant.other.rgb-value, support.constant.color | #008880 | — |
| entity.name.function, support.function, support.constant.handlebars, source.powershell variable.other.member, entity.name.operator.custom-literal | #4078F2 | — |
| support.class, support.type, entity.name.type, entity.name.namespace, entity.other.attribute, entity.name.scope-resolution, entity.name.class, storage.type.numeric.go, storage.type.byte.go, storage.type.boolean.go, storage.type.string.go, storage.type.uintptr.go, storage.type.error.go, storage.type.rune.go, storage.type.cs, storage.type.generic.cs, storage.type.modifier.cs, storage.type.variable.cs, storage.type.annotation.java, storage.type.generic.java, storage.type.java, storage.type.object.array.java, storage.type.primitive.array.java, storage.type.primitive.java, storage.type.token.java, storage.type.groovy, storage.type.annotation.groovy, storage.type.parameters.groovy, storage.type.generic.groovy, storage.type.object.array.groovy, storage.type.primitive.array.groovy, storage.type.primitive.groovy | #B15EF2 | — |
| meta.type.cast.expr, meta.type.new.expr, support.constant.math, support.constant.dom, support.constant.json, entity.other.inherited-class | #5F36B2 | — |
| keyword.control, source.cpp keyword.operator.new, source.cpp keyword.operator.delete, keyword.other.using, keyword.other.directive.using, keyword.other.operator, entity.name.operator | #5F36B2 | — |
| variable, meta.definition.variable.name, support.variable, entity.name.variable, constant.other.placeholder | #C99100 | — |
| variable.other.constant, variable.other.enummember | #986801 | — |
| meta.object-literal.key | #17181A | — |
| support.constant.property-value, support.constant.font-name, support.constant.media-type, support.constant.media, constant.other.color.rgb-value, constant.other.rgb-value, support.constant.color | #008880 | — |
| meta.embedded, source.groovy.embedded, string meta.image.inline.markdown | #4DA621 | — |
| comment | #8393A3 | — |
| constant.language | #175CE6 | — |
| constant.numeric, variable.other.enummember, keyword.operator.plus.exponent, keyword.operator.minus.exponent | #E54595 | — |
| constant.regexp | #4DA621 | — |
| entity.name.tag | #E24864 | — |
| entity.name.tag.css, entity.other.attribute-name, entity.other.attribute-name.class.css, entity.other.attribute-name.id.css, entity.other.attribute-name.parent-selector.css, entity.other.attribute-name.pseudo-class.css, entity.other.attribute-name.pseudo-element.css, source.css.less entity.other.attribute-name.id, entity.other.attribute-name.scss | #17181A | — |
| invalid | #cd3131 | — |
| markup.underline | — | underline |
| markup.bold | #000080 | bold |
| markup.heading | #175CE6 | bold |
| markup.italic | — | italic |
| markup.strikethrough | — | strikethrough |
| markup.inserted | #4DA621 | — |
| markup.deleted | #E24864 | — |
| markup.changed | #175CE6 | — |
| markup.inline.raw | #4DA621 | — |
| storage | #5F36B2 | — |
| storage.type | #5F36B2 | — |
| storage.modifier, keyword.operator.noexcept | #5F36B2 | — |
| string, meta.embedded.assembly | #4DA621 | — |
| string.tag, string.value, string.regexp | #4DA621 | — |
| keyword | #5F36B2 | — |
| keyword.control | #5F36B2 | — |
| keyword.operator | #000000 | — |
| keyword.operator.new, keyword.operator.expression, keyword.operator.cast, keyword.operator.sizeof, keyword.operator.logical.python, keyword.operator.wordlike | #5F36B2 | — |
| entity.name.function, support.function, support.constant.handlebars, source.powershell variable.other.member, entity.name.operator.custom-literal | #4078F2 | — |
| support.class, support.type, entity.name.type, entity.name.namespace, entity.other.attribute, entity.name.scope-resolution, entity.name.class, storage.type.numeric.go, storage.type.byte.go, storage.type.boolean.go, storage.type.string.go, storage.type.uintptr.go, storage.type.error.go, storage.type.rune.go, storage.type.cs, storage.type.generic.cs, storage.type.modifier.cs, storage.type.variable.cs, storage.type.annotation.java, storage.type.generic.java, storage.type.java, storage.type.object.array.java, storage.type.primitive.array.java, storage.type.primitive.java, storage.type.token.java, storage.type.groovy, storage.type.annotation.groovy, storage.type.parameters.groovy, storage.type.generic.groovy, storage.type.object.array.groovy, storage.type.primitive.array.groovy, storage.type.primitive.groovy | #B15EF2 | — |
| meta.type.cast.expr, meta.type.new.expr, support.constant.math, support.constant.dom, support.constant.json, entity.other.inherited-class | #5F36B2 | — |
| keyword.control, source.cpp keyword.operator.new, source.cpp keyword.operator.delete, keyword.other.using, keyword.other.directive.using, keyword.other.operator, entity.name.operator | #5F36B2 | — |
| variable, meta.definition.variable.name, support.variable, entity.name.variable, constant.other.placeholder | #C99100 | — |
| variable.other.constant, variable.other.enummember | #986801 | — |
| meta.object-literal.key | #17181A | — |
| support.constant.property-value, support.constant.font-name, support.constant.media-type, support.constant.media, constant.other.color.rgb-value, constant.other.rgb-value, support.constant.color | #008880 | — |
| meta.embedded, source.groovy.embedded, string meta.image.inline.markdown | #4DA621 | — |
| comment | #8393A3 | — |
| constant.language | #175CE6 | — |
| constant.numeric, variable.other.enummember, keyword.operator.plus.exponent, keyword.operator.minus.exponent | #E54595 | — |
| constant.regexp | #4DA621 | — |
| entity.name.tag | #E24864 | — |
| entity.name.tag.css, entity.other.attribute-name, entity.other.attribute-name.class.css, entity.other.attribute-name.id.css, entity.other.attribute-name.parent-selector.css, entity.other.attribute-name.pseudo-class.css, entity.other.attribute-name.pseudo-element.css, source.css.less entity.other.attribute-name.id, entity.other.attribute-name.scss | #17181A | — |
| invalid | #cd3131 | — |
| markup.underline | — | underline |
| markup.bold | #000080 | bold |
| markup.heading | #175CE6 | bold |
| markup.italic | — | italic |
| markup.strikethrough | — | strikethrough |
| markup.inserted | #4DA621 | — |
| markup.deleted | #E24864 | — |
| markup.changed | #175CE6 | — |
| markup.inline.raw | #4DA621 | — |
| storage | #5F36B2 | — |
| storage.type | #5F36B2 | — |
| storage.modifier, keyword.operator.noexcept | #5F36B2 | — |
| string, meta.embedded.assembly | #4DA621 | — |
| string.tag, string.value, string.regexp | #4DA621 | — |
| keyword | #5F36B2 | — |
| keyword.control | #5F36B2 | — |
| keyword.operator | #000000 | — |
| keyword.operator.new, keyword.operator.expression, keyword.operator.cast, keyword.operator.sizeof, keyword.operator.logical.python, keyword.operator.wordlike | #5F36B2 | — |
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}!`;
}