Official Druim Language Extension
Publisher: DruimThemes in package: 1
Language support for the Druim programming language.
Language support for the Druim programming language.
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.control.function.druim, keyword.control.return.druim | #BC4C0D | bold |
| storage.modifier.scope.druim | #A9C85C | bold |
| storage.modifier.immutable.druim | #C4B447 | bold |
| storage.type.druim | #9ACC7D | — |
| entity.name.function.druim, entity.name.function.call.druim | #C98A47 | bold |
| support.function.builtin.druim | #d3550d | bold |
| variable.other.readwrite.druim, variable.other.druim | #DDD5C4 | — |
| string.quoted.double.druim | #9ACC7D | — |
| source.druim.embedded variable.other.readwrite.druim, meta.embedded.inline.druim variable.other.readwrite.druim | #5F7F4E | — |
| punctuation.section.embedded.begin.druim, punctuation.section.embedded.end.druim | #BC4C0D | bold |
| constant.numeric.integer.druim, constant.numeric.decimal.druim | #C4B447 | — |
| constant.language.boolean.druim, constant.language.void.druim | #B47A32 | bold |
| keyword.operator.define-empty.druim, keyword.operator.define.druim | #979281 | — |
| keyword.operator.copy.druim, keyword.operator.bind.druim | #B49A63 | — |
| keyword.operator.guard.druim | #C4B447 | — |
| keyword.operator.mutate.druim | #BC4C0D | bold |
| keyword.operator.print.druim | #A9C85C | bold |
| keyword.operator.get.druim, keyword.operator.has.druim | #8DAA52 | — |
| keyword.operator.logical.druim | #C98A47 | — |
| keyword.operator.comparison.druim | #B49A63 | — |
| keyword.operator.arithmetic.druim | #C4B447 | — |
| keyword.control.block.druim | #9ACC7D | bold |
| keyword.control.function.delimiter.druim | #BC4C0D | bold |
| keyword.control.loop.druim | #C98A47 | bold |
| punctuation.definition.collection.box.druim | #C4B447 | — |
| punctuation.definition.collection.bag.druim | #8DAA52 | — |
| punctuation.separator.comma.druim, punctuation.terminator.statement.druim | #756C58 | — |
| keyword.control.program-boundary.druim | #B47A32 | bold |
| comment.line.druim, comment.block.druim | #6F7654 | italic |
| keyword.control, keyword.control.flow, keyword.control.conditional, keyword.control.loop, keyword.control.import, keyword.control.export, keyword.control.return, keyword.control.exception | #BC4C0D | bold |
| storage.type, storage.modifier | #A9C85C | — |
| entity.name.type, entity.name.class, entity.name.interface, entity.name.enum, support.type, support.class | #9ACC7D | — |
| entity.name.function, support.function, meta.function-call entity.name.function, variable.function | #C98A47 | bold |
| variable.parameter | #B49A63 | — |
| variable.other, variable.other.readwrite, variable.other.constant | #DDD5C4 | — |
| variable.other.property, variable.other.object.property, meta.object-literal.key, support.variable.property | #B49A63 | — |
| string, string.quoted, string.template | #9ACC7D | — |
| constant.numeric | #C4B447 | — |
| constant.language, constant.language.boolean, constant.language.null, constant.language.undefined | #B47A32 | bold |
| keyword.operator | #C4B447 | — |
| comment | #6F7654 | italic |
| punctuation.separator, punctuation.terminator, punctuation.definition | #756C58 | — |
| entity.name.tag, meta.tag | #BC4C0D | — |
| entity.other.attribute-name | #C98A47 | — |
| entity.other.attribute-name.class.css, entity.other.attribute-name.id.css, entity.name.tag.css, meta.selector.css | #BC4C0D | — |
| support.type.property-name.css, support.type.property-name.scss, support.type.property-name.less | #C98A47 | — |
| support.constant.property-value.css, support.constant.property-value.scss, support.constant.property-value.less | #9ACC7D | — |
| support.type.property-name.json, string.json meta.structure.dictionary.json, meta.object-literal.key | #C98A47 | — |
| markup.heading, entity.name.section | #BC4C0D | bold |
| markup.bold | #C4B447 | bold |
| markup.italic | #9ACC7D | italic |
| markup.inline.raw, markup.raw.inline | #B49A63 | — |
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}!`;
}