SirriS's Submarine
Publisher: Donald HarringtonThemes in package: 1
Aquatic dark themed layout where almost every single scope and token has its own unique color designed to be as simple and intuitive as possible
Aquatic dark themed layout where almost every single scope and token has its own unique color designed to be as simple and intuitive as possible
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 | #09ff00 | italic |
| invalid, invalid.illegal | #FF5370 | — |
| entity.name.function.preprocessor | #e600ff | — |
| keyword.control.directive.pragma, entity.other.attribute-name.pragma.preprocessor | #bac891 | — |
| keyword.control.directive.include | #99cca2 | — |
| punctuation.definition.string, string.quoted.double | #99ccc9 | — |
| keyword.operator.ternary, keyword.operator.decrement, keyword.operator.increment, keyword.operator.assignment, keyword.operator.comparison, constant.numeric.decimal, keyword.operator.arithmetic, keyword.operator.logical, keyword.operator.bitwise, storage.modifier.reference | #cee0ef | — |
| storage.modifier.specifier.functional.pre-parameters.constexpr | #d81ced | — |
| punctuation.separator.namespace.access, punctuation.separator.dot-access, punctuation.separator.colon.range-based | #d996ec | — |
| storage.type.modifier.access.control.public | #65ceeb | — |
| storage.type.modifier.access.control.protected | #e3dfd8 | — |
| storage.type.modifier.access.control.private | #EDCBBD | — |
| storage.type, storage.modifier.specifier.const | #2eabff | — |
| keyword.control.return | #da4141 | — |
| storage.type.template, punctuation.section.angle-brackets.begin.template.definition, punctuation.section.angle-brackets.end.template.definition | #cecece | — |
| storage.type.template.argument.typename | #a5d11f | — |
| keyword.control.if, keyword.control.else | #ecc423 | — |
| constant.language.true | #2be916 | — |
| constant.language.false | #ff0000 | — |
| entity.name.scope-resolution, entity.name.namespace | #e3e47e | — |
| punctuation.terminator.statement, punctuation.separator.delimiter.comma | #ffffff | — |
| keyword.operator.sizeof | #b587ff | — |
| storage.type.class, entity.name.type | #31b699 | — |
| entity.name.function.member | #89d560 | — |
| meta.body.class, meta.body.struct, meta.body.switch, meta.body.function.definition | #a2dc82 | — |
| variable.other.object.access | #71eff1 | — |
| variable.other.object.property | #d4c145 | — |
| variable.parameter | #8fa86e | — |
| entity.name.function.call | #a781ff | — |
| storage.type.enum | #d287e2 | — |
| variable.other.enummember | #8fa86e | — |
| storage.type.struct | #d1d352 | — |
| entity.name.function.definition | #d6cf02 | — |
| keyword.control.switch | #00c8ff | — |
| keyword.control.case | #60c251 | — |
| keyword.control.default | #949494 | — |
| storage.modifier.static, storage.modifier.specifier.static | #b0b0b0 | — |
| storage.modifier.inline, storage.modifier.specifier.functional.pre-parameters.inline | #cb703a | — |
| meta.body.function.definition.special.operator-overload, meta.head.function.definition.special.operator-overload, keyword.other.operator.overload | #9bcbe2 | — |
| keyword.control.for | #00d3c5 | — |
| storage.type.built-in.primitive | #007efd | — |
| punctuation.separator.pointer-access | #a23fff | — |
| keyword.control.break | #fa9537 | — |
| keyword.control.directive.conditional.if, keyword.control.directive.conditional.defined | #41e4c9 | — |
| keyword.operator.new | #4bd31d | — |
| keyword.operator.delete | #d40000 | — |
| constant.language.nullptr | #59838c | — |
| keyword.control.while | #88e58d | — |
| entity.name.function.definition.special.constructor | #dcd92c | — |
| keyword.control.catch | #b97a0c | — |
| storage.modifier.friend | #8a63ff | — |
| keyword.control.catch, keyword.control.throw | #b97a0c | — |
| storage.type.decltype | #0e5ad4 | — |
| keyword.other.using.directive | #4ccee2 | — |
| storage.type.namespace.directive | #c567ff | — |
| meta.declaration.type.alias | #85de25 | — |
| keyword.control.throw | #c86400 | — |
| keyword.other.typedef | #dde771 | — |
| keyword.operator.typeid | #71bce7 | — |
| storage.modifier.specifier.functional.pre-parameters.mutable | #00d003 | — |
| storage.type.union | #ff2929 | — |
| storage.modifier.virtual | #b7ffef | — |
| storage.modifier.specifier.volatile | #ff0000 | — |
| #2aa747 | — |
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}!`;
}