Green paper
Publisher: Александр МаджугинThemes in package: 6
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 |
|---|---|---|
| — | #3e4b53 | — |
| console.error | #ca0000ff | — |
| console.input | #3BA776 | — |
| console.prompt | #b651bcff | bold |
| console.warning | #cd6600ff | — |
| console.debug | #5d6666ff | — |
| hyperlink | #0d1171ff | — |
| markup.deleted | #ffffffff | — |
| markup.inserted | #000000ff | — |
| markup.changed | #f8f8f8ff | — |
| markup.underline | — | underline |
| markup.bold | — | bold |
| markup.italic | — | italic |
| property | #934b3cff | — |
| comment | #989898 | italic |
| comment.line.number-sign | #484848 | italic bold |
| comment.block.documentation | #484848 | italic |
| constant | #160c2a | bold |
| constant.numeric | #e10000 | — |
| constant.other.placeholder.py | #7b0000ff | — |
| variable | — | bold |
| entity | #cc3611ff | — |
| entity.name.type | #6c65b0ff | — |
| entity.other.inherited-class | #000000ff | — |
| entity.name.function | #000 | — |
| entity.name.function.argument | #a28d00ff | — |
| entity.name.tag | #2265ad | bold |
| entity.other.attribute-name | #cb2d01ff | — |
| keyword | #762625 | bold |
| keyword.control | #A9312F | bold |
| storage | #8f200f | bold |
| token.storage.js,token.storage.ts | #393135 | bold |
| keyword.operator.expression.delete.js,keyword.operator.expression.in.js,keyword.operator.expression.of.js,keyword.operator.expression.instanceof.js,keyword.operator.new.js,keyword.operator.expression.typeof.js,keyword.operator.expression.void.js | #577909 | bold |
| meta.selector | #577909 | bold |
| string | punctuation.definition.string | #e10000 | — |
| string, entity.other.inherited-class | #e10000 | — |
| Number | #9f1bf1 | — |
| #9f1bf1 | — | |
| support | #3c7a03ff | — |
| variable.parameter | #ca7300 | — |
| keyword.operator | #0f95b0 | |
| keyword.operator.logical.js,keyword.operator.logical.ts | #ca004b | — |
| keyword.operator.arithmetic.js,keyword.operator.comparison.js,keyword.operator.arithmetic.ts,keyword.operator.comparison.ts | #2598da | — |
| invalid.deprecated | #cb2d01 | |
| invalid.illegal | #333333ff | — |
| string source | #080808ff | — |
| String constant | #696969ff | — |
| string variable | #234a97ff | — |
| string.regexp | #cf5628ff | — |
| string.regexp.character-class, string.regexp constant.character.escaped, string.regexp source.ruby.embedded, string.regexp string.regexp.arbitrary-repitition | #cf5628ff | — |
| string.regexp constant.character.escape | #811f24ff | — |
| text source | #080808ff | — |
| function name | #ae7a00ff | — |
| function argument | #99a600ff | — |
| support.function | #50001d | — |
| support.constant | #702d00 | — |
| support.variable | #295502ff | — |
| entity.name.type.namespace | #b18534 | — |
| support.class, entity.name.type.class | #b18534 | — |
| entity.name.class.identifier.namespace.type | #b18534 | — |
| entity.name.class | #4090f3 | — |
| entity.name.type | #b18534 | — |
| entity.name.tag.html | #881280 | |
| entity.other.attribute-name.html | #994500 | — |
| string.quoted.double.html | #1A1AA8 | — |
| punctuation.definition.tag,punctuation.definition.string | #881280 | — |
| support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss | #cf8f3b | bold |
| support.constant.color.w3c-standard-color-name.css,entity.other.attribute-name.class.css | #cf8f3b | bold |
| support.type.vendored.property-name.css | #56b6c2 | — |
| punctuation.definition.template-expression.begin.js,punctuation.definition.template-expression.end.js,punctuation.definition.template-expression.begin.ts,punctuation.definition.template-expression.end.ts | #499504 | — |
| support.module.node.js,support.type.object.module.js,support.module.node.js,support.module.node.ts,support.type.object.module.ts,support.module.node.ts | #b18534 | — |
| variable.other.readwrite.js,support.variable.property.js,support.variable.object.process.js,variable.other.readwrite.ts,support.variable.property.ts,support.variable.object.process.ts | #006600 | |
| meta.object-literal.key.js,meta.object-literal.key.ts | #3C7A03 | — |
| support.constant.json.js,support.constant.json.ts | #cf8f3b | — |
| keyword.operator.expression.instanceof.js,keyword.operator.expression.instanceof.ts | #577909 | |
| keyword.operator.expression.typeof.js,keyword.operator.expression.typeof.ts | #577909 | |
| support.type.object.console.js,support.type.object.console.ts | #499504 | — |
| keyword.operator.js,keyword.operator.ts | #56b6c2 | — |
| support.type.object.dom.js,support.type.object.dom.ts | #56b6c2 | — |
| support.variable.dom.js,support.variable.property.dom.js,support.variable.dom.ts,support.variable.property.dom.ts, | #499504 | — |
| var.this.js,var.this.ts,variable.language.this.js,variable.language.this.ts | #1c36b7 | bold |
| markup.list | #7d451cff | — |
| markup.heading | markup.heading entity.name | #142b5aff | — |
| markup.quote | #0b6125ff | — |
| Markup.italic | #080808ff | — |
| markup.bold | #080808ff | bold |
| markup.underline | #080808ff | underline |
| markup.link | #234a97ff | underline |
| markup.raw | #234a97ff | — |
| markup.deleted | #47565fff | — |
| markup.inserted | #cc0000ff | — |
| markup.changed | #ffffffff | — |
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}!`;
}