Dargoth Design
Publisher: DargothDesignThemes in package: 1
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 |
|---|---|---|
| comment, punctuation.definition.comment | #7a7a7a | italic |
| meta.tag.metadata.doctype.html, constant.character.entity.numeric.decimal.html | #8866d4 | — |
| entity.name.tag.html | #ff7676 | — |
| entity.other.attribute-name.html | #97d7ff | — |
| punctuation.separator.key-value.html | #ff7676 | — |
| string.quoted.double.html | #f8e473 | — |
| variable.scss | #ffffff | — |
| entity.other.attribute-name.class.css, entity.other.attribute-name.id.css | #28fd5a | — |
| support.type.property-name.css, support.type.property-name.media.css | #97d7ff | — |
| support.constant.property-value.css, constant.numeric.css, support.function.misc.scss, constant.other.color.rgb-value.hex.css, support.constant.color.w3c-extended-color-name.css, support.constant.font-name.css | #8866d4 | — |
| entity.name.tag.css | #ff7676 | — |
| string.quoted.double.scss, string.quoted.single.scss | #f8e473 | — |
| keyword.control.at-rule.media.scss, keyword.control.at-rule.mixin.scss, keyword.control.content.scss | #ff9341 | — |
| entity.name.function.scss | #ff4141 | — |
| punctuation.section.embedded.begin.php, punctuation.section.embedded.end.php | #8866d4 | — |
| variable.other.php, variable.other.global.safer.php | #28fd5a | — |
| keyword.control.import.include.php, support.function.mysqli.php, keyword.control.if.php, keyword.control.while.php, keyword.control.for.php, support.function.construct.php, constant.other.php, entity.name.function.php, support.function.datetime.php, storage.type.php, keyword.control.foreach.php, keyword.operator.logical.php, support.function.array.php, support.function.construct.output.php, keyword.control.die.php, support.function.string.php | #97d7ff | — |
| constant.numeric.decimal.php, constant.numeric.octal.php | #8866d4 | — |
| string.quoted.single.php, string.quoted.double.php, string.quoted.double.sql.php | #f8e473 | — |
| keyword.operator.key.php, keyword.operator.assignment.php, keyword.operator.comparison.php, keyword.operator.arithmetic.php | #ff7676 | — |
| storage.type.function.js, meta.function-call.js, variable.language.this.js, storage.type.js, variable.other.property.js, meta.object-literal.key.js, support.variable.property.js, variable.other.object.property.js, keyword.control.loop.js, keyword.control.conditional.js, storage.type.function.ts, variable.language.this.ts, storage.type.ts, meta.object-literal.key.ts, entity.name.function.ts, variable.other.object.property.ts, variable.other.property.ts, support.variable.property.ts, keyword.control.loop.ts, keyword.control.conditional.ts | #97d7ff | — |
| string.quoted.single.js, string.quoted.double.js, string.quoted.single.ts, string.quoted.double.ts | #f8e473 | — |
| constant.numeric.decimal.js, constant.numeric.decimal.ts | #8866d4 | — |
| variable.other.object.js, variable.other.object.js, variable.other.object.ts | #28fd5a | — |
| keyword.operator.assignment.js, keyword.operator.arithmetic.js, keyword.operator.comparison.js, keyword.operator.increment.js, keyword.operator.relational.js, keyword.operator.logical.js, keyword.operator.assignment.compound.js, keyword.operator.bitwise.js, keyword.operator.increment.ts, keyword.operator.assignment.ts, keyword.operator.relational.ts, keyword.operator.assignment.compound.ts, keyword.operator.comparison.ts, keyword.operator.arithmetic.ts, keyword.operator.logical.ts, keyword.operator.bitwise.ts | #ff7676 | — |
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}!`;
}