Space Wars Theme
Publisher: Murat AlpaslanThemes in package: 1
A dark theme inspired by Star Wars with support for all programming languages
A dark theme inspired by Star Wars with support for all programming languages
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 |
|---|---|---|
| keyword, keyword.control, keyword.operator, keyword.other, keyword.type, keyword.modifier, keyword.declaration, keyword.import, keyword.export, keyword.return, keyword.break, keyword.continue, keyword.throw, keyword.try, keyword.catch, keyword.finally, keyword.if, keyword.else, keyword.switch, keyword.case, keyword.default, keyword.for, keyword.while, keyword.do, keyword.goto, keyword.const, keyword.let, keyword.var, keyword.function, keyword.class, keyword.interface, keyword.enum, keyword.struct, keyword.union, keyword.type, keyword.typedef, keyword.namespace, keyword.using, keyword.package, keyword.import, keyword.export, keyword.public, keyword.private, keyword.protected, keyword.static, keyword.final, keyword.abstract, keyword.virtual, keyword.override, keyword.new, keyword.delete, keyword.this, keyword.super, keyword.self, keyword.base, keyword.as, keyword.is, keyword.in, keyword.of, keyword.from, keyword.to, keyword.by, keyword.with, keyword.without, keyword.using, keyword.where, keyword.select, keyword.from, keyword.group, keyword.by, keyword.order, keyword.by, keyword.having, keyword.join, keyword.on, keyword.into, keyword.let, keyword.where, keyword.select, keyword.distinct, keyword.skip, keyword.take, keyword.first, keyword.last, keyword.single, keyword.any, keyword.all, keyword.contains, keyword.like, keyword.in, keyword.between, keyword.not, keyword.and, keyword.or, keyword.xor, keyword.true, keyword.false, keyword.null, keyword.undefined, keyword.void, keyword.never, keyword.any, keyword.unknown, keyword.never, keyword.object, keyword.string, keyword.number, keyword.boolean, keyword.symbol, keyword.bigint, keyword.never, keyword.any, keyword.unknown, keyword.void, keyword.never, keyword.object, keyword.string, keyword.number, keyword.boolean, keyword.symbol, keyword.bigint | #FF0000 | — |
| string, string.quoted, string.quoted.single, string.quoted.double, string.quoted.triple, string.quoted.other, string.quoted.single.block, string.quoted.double.block, string.quoted.triple.block, string.quoted.other.block, string.quoted.single.raw, string.quoted.double.raw, string.quoted.triple.raw, string.quoted.other.raw, string.quoted.single.heredoc, string.quoted.double.heredoc, string.quoted.triple.heredoc, string.quoted.other.heredoc, string.quoted.single.interpolated, string.quoted.double.interpolated, string.quoted.triple.interpolated, string.quoted.other.interpolated, string.quoted.single.template, string.quoted.double.template, string.quoted.triple.template, string.quoted.other.template, string.quoted.single.regexp, string.quoted.double.regexp, string.quoted.triple.regexp, string.quoted.other.regexp, string.quoted.single.other, string.quoted.double.other, string.quoted.triple.other, string.quoted.other.other | #32CD32 | — |
| comment, comment.line, comment.block, comment.documentation, comment.line.double-slash, comment.line.double-dash, comment.line.number-sign, comment.line.percentage, comment.line.character, comment.block.documentation | #8A2BE2 | — |
| entity.name.function, support.function, variable.function, variable.annotation.function, meta.function, meta.function-call, meta.method, meta.method-call | #00BFFF | — |
| variable, variable.other, variable.parameter, variable.function, variable.annotation, variable.other.constant, variable.other.readwrite, variable.other.readonly, variable.other.property, variable.language, variable.language.this, variable.language.super, variable.language.self, variable.language.base | #32CD32 | — |
| entity.name.type, entity.name.class, entity.name.interface, entity.name.struct, entity.name.enum, entity.name.union, entity.name.trait, entity.name.type.alias, entity.name.type.parameter, support.type, support.class, support.interface, support.struct, support.enum, support.union, support.trait, support.type.alias, support.type.parameter | #8A2BE2 | — |
| constant, constant.numeric, constant.numeric.integer, constant.numeric.float, constant.numeric.hex, constant.numeric.octal, constant.numeric.binary, constant.numeric.decimal, constant.character, constant.character.escape, constant.character.unicode, constant.other, constant.other.placeholder, constant.other.symbol, constant.language, constant.language.boolean, constant.language.null, constant.language.undefined, constant.language.nan, constant.language.infinity | #FF6347 | — |
| keyword.operator, keyword.operator.assignment, keyword.operator.arithmetic, keyword.operator.logical, keyword.operator.bitwise, keyword.operator.comparison, keyword.operator.ternary, keyword.operator.word, keyword.operator.other | #00BFFF | — |
| entity.name.tag, entity.name.tag.*, entity.name.tag.xml, entity.name.tag.xml.*, entity.name.tag.jsx, entity.name.tag.tsx, entity.name.tag.jsx.*, entity.name.tag.tsx.*, entity.name.tag.vue, entity.name.tag.vue.*, entity.name.tag.angular, entity.name.tag.angular.*, entity.name.tag.php, entity.name.tag.php.*, entity.name.tag.python, entity.name.tag.python.*, entity.name.tag.django, entity.name.tag.django.*, entity.name.tag.jinja, entity.name.tag.jinja.*, entity.name.tag.blade, entity.name.tag.blade.*, entity.name.tag.markdown, entity.name.tag.markdown.*, entity.name.tag.yaml, entity.name.tag.yaml.*, entity.name.tag.json, entity.name.tag.json.*, entity.name.tag.sgml, entity.name.tag.sgml.*, entity.name.tag.svg, entity.name.tag.svg.*, entity.name.tag.mathml, entity.name.tag.mathml.*, entity.name.tag.custom, entity.name.tag.custom.* | #00FFFF | — |
| punctuation.definition.tag, punctuation.definition.tag.*, punctuation.definition.tag.xml, punctuation.definition.tag.xml.*, punctuation.definition.tag.jsx, punctuation.definition.tag.tsx, punctuation.definition.tag.jsx.*, punctuation.definition.tag.tsx.*, punctuation.definition.tag.vue, punctuation.definition.tag.vue.*, punctuation.definition.tag.angular, punctuation.definition.tag.angular.*, punctuation.definition.tag.php, punctuation.definition.tag.php.*, punctuation.definition.tag.python, punctuation.definition.tag.python.*, punctuation.definition.tag.django, punctuation.definition.tag.django.*, punctuation.definition.tag.jinja, punctuation.definition.tag.jinja.*, punctuation.definition.tag.blade, punctuation.definition.tag.blade.*, punctuation.definition.tag.markdown, punctuation.definition.tag.markdown.*, punctuation.definition.tag.yaml, punctuation.definition.tag.yaml.*, punctuation.definition.tag.json, punctuation.definition.tag.json.*, punctuation.definition.tag.sgml, punctuation.definition.tag.sgml.*, punctuation.definition.tag.svg, punctuation.definition.tag.svg.*, punctuation.definition.tag.mathml, punctuation.definition.tag.mathml.*, punctuation.definition.tag.custom, punctuation.definition.tag.custom.*, punctuation.definition.markup, punctuation.definition.markup.*, punctuation.definition.template, punctuation.definition.template.*, punctuation.definition.block, punctuation.definition.block.*, punctuation.definition.inline, punctuation.definition.inline.* | #00FFFF | — |
| entity.other.attribute-name, entity.other.attribute-name.id, entity.other.attribute-name.class, entity.other.attribute-name.style, entity.other.attribute-name.href, entity.other.attribute-name.src, entity.other.attribute-name.alt, entity.other.attribute-name.title, entity.other.attribute-name.other | #FFEB3B | — |
| support.type.property-name, support.constant.property-value, meta.property-name, meta.property-value, variable.other.property, variable.other.object.property | #FF4500 | — |
| support.constant.property-value, meta.property-value, variable.other.property-value, constant.other.property-value | #00FF7F | — |
| markup.underline.link, markup.underline.link:visited, markup.underline.link:active, markup.underline.link:hover | #00CED1 | — |
| meta.decorator, meta.decorator.other, meta.decorator.annotation, meta.decorator.attribute | #8A2BE2 | — |
| support.type.built-in, support.type.primitive, support.type.system, support.type.user-defined | #9B59B6 | — |
| support.function.built-in, support.function.system, support.function.console, support.function.math, support.function.string, support.function.array, support.function.object, support.function.date, support.function.regexp, support.function.json, support.function.promise, support.function.error, support.function.symbol, support.function.proxy, support.function.reflect, support.function.map, support.function.set, support.function.weakmap, support.function.weakset | #00BFFF | — |
| support.constant.built-in, support.constant.system, support.constant.math, support.constant.date, support.constant.regexp, support.constant.json, support.constant.promise, support.constant.error, support.constant.symbol, support.constant.proxy, support.constant.reflect, support.constant.map, support.constant.set, support.constant.weakmap, support.constant.weakset | #FFD700 | — |
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}!`;
}