SoftDark
Publisher: Jove JonovskiThemes 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 | #425d63 | — |
| variable, entity.name.type.enum, storage.modifier.import, entity.name.function.preprocessor | #8d9fa3 | — |
| meta.attribute, variable.other.property, variable.other.object.property, variable.other.enummember, constant.other.caps, entity.other.attribute, support.type.vendored.property-name, support.type.property-name, support.variable.property, entity.name.tag.yaml | #789ca7 | — |
| variable.parameter.function.language.special.self, variable.parameter.function.language.special.this, variable.language.special.self, variable.language.special.this, variable.language.self, variable.language.this | #637c80 | — |
| meta.brace, punctuation, storage.type.function.arrow, keyword.operator.class | #3e565c | — |
| string, meta.require.xml.toc | #78a05e | — |
| keyword, entity.name.tag, support.type.object.module.js | #9a6ba8 | — |
| meta.property-value, constant, support.constant, keyword.other.unit | #30a789 | — |
| storage, storage.type.function, storage.type.class, storage.type.modifier, storage.type.js, storage.type.ts, storage.type.tsx, keyword.control.new, keyword.operator.new, keyword.command, keyword.local.lua | #5c94c2 | — |
| meta.function-call.generic, entity.name.function, support.function | #9b8962 | — |
| support, entity.name.type.class, entity.name.type.namespace, entity.name.scope-resolution, entity.other.alias, entity.other.inherited-class, keyword.other.class | #a4a550 | — |
| storage.type, support.type, keyword.type, entity.name.type, keyword.other.type | #37a1b4 | — |
| keyword.other.special-method.batchfile, entity.other.attribute-name, punctuation.section.embedded.begin.php, punctuation.section.embedded.end.php | #9b7174 | — |
| entity.other.attribute-name.class | #bb6c8a | — |
| entity.other.attribute-name.id | #ca6a70 | — |
| support.class.component | #b9659d | — |
| markup.underline.link | #4f9b97 | — |
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}!`;
}