Lua Eclipse Theme
Publisher: Emil RühmlandThemes in package: 1
A dark pastel theme for Lua with JSON support.
A dark pastel theme for Lua with JSON support.
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 |
|---|---|---|
| variable.lua, variable.parameter.lua, entity.lua, meta, keyword.operator.lua, entity.name.class.lua, source.lua, support.type.lua | #c5c5c5 | — |
| entity.other.attribute.lua | #7983ab | — |
| variable.language.self.lua, meta.function.lua entity.name.class.lua | #d1be5f | — |
| entity.name.class.lua | — | bold |
| meta.function.lua meta.parameter.lua variable.parameter.function.lua | — | bold |
| constant.numeric.lua, constant.language.lua | #75a1c9 | — |
| string.lua, string.quoted.double.lua, string.quoted.single.lua, punctuation.definition.string.begin.lua, punctuation.definition.string.end.lua, string.quoted.other.multiline.lua | #729369 | — |
| support.lua, support.function.lua, entity.name.function.lua, support.function.any-method.lua, support.function.library.lua | #9073b6 | — |
| meta.function.lua | #9073b6 | bold |
| entity.name.function.lua | — | bold |
| meta.parameter.lua | — | |
| comment.lua, comment.line.double-dash.lua, comment.line.double-dash.documentation.lua | #5f5f5f | italic |
| punctuation.definition.comment.lua | #5f5f5f | |
| storage.type.annotation.lua | #5f5f5f | bold |
| entity.name.variable.lua, support.class.lua, comment.line.double-dash.documentation.lua support.type.lua, comment.line.double-dash.documentation.lua keyword.operator.lua, comment.line.double-dash.documentation.lua string.quoted.double.lua, comment.line.double-dash.documentation.lua string.quoted.single.lua, comment.line.double-dash.documentation.lua punctuation.definition.string.begin.lua, comment.line.double-dash.documentation.lua punctuation.definition.string.end.lua | #5f5f5f | |
| keyword.local.lua | #ac7070 | — |
| meta.function.lua keyword.local.lua | #ac7070 | italic |
| keyword.control.lua | #cd844f | |
| comment.line.double-slash.js | #5f5f5f | — |
| string.quoted.double.json | #6A8759 | — |
| meta.object-literal.key.json, meta.structure.dictionary.key.json, meta.structure.dictionary support.type.property-name.json, support.type.property-name.json | #9876AA | — |
| constant.language.json, punctuation.separator.array.json, punctuation.separator.dictionary.key-value.json | #CC7832 | — |
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}!`;
}