Invariant
Publisher: Andre BraitThemes in package: 1
A semantic dark editor theme based on Monokai, where color identifies what a symbol is and formatting shows how it is used.
A semantic dark editor theme based on Monokai, where color identifies what a symbol is and formatting shows how it is used.
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 | #ffffff | — |
| keyword, storage, constant.language, variable.language | #ff007f | bold |
| keyword.operator, punctuation.accessor, punctuation.definition.bold.markdown, punctuation.definition.italic.markdown, punctuation.definition.list.begin.markdown, punctuation.definition.markdown, punctuation.definition.quote.begin.markdown, punctuation.definition.raw.markdown, punctuation.definition.strikethrough.markdown, punctuation.definition.table.markdown, punctuation.separator, punctuation.terminator | #ff007f | — |
| string, markup.inline.raw.string | #ece47e | — |
| constant.numeric, constant.character.escape | #c48cff | — |
| entity.name.type, entity.name.class, entity.name.struct, entity.name.enum, entity.name.interface, support.type, support.class | #52e3f6 | — |
| entity.name.function, meta.function-call.generic.python, meta.function-call entity.name.type, meta.function-call entity.name.class, support.function | #a7ec21 | — |
| variable.parameter | #79abff | — |
| variable.parameter.function.language.special.self.python, variable.language.special.self.python, variable.parameter.function.language.special.cls.python, variable.language.special.cls.python | #ff007f | bold |
| variable, meta.object-literal.key, support.type.property-name.json, support.type.property-name.json.comments, support.type.property-name.json.lines, support.variable | #cfbfad | — |
| entity.name.tag, entity.other.attribute-name.class, entity.other.attribute-name.id | #a7ec21 | — |
| markup.heading, entity.name.section | #a7ec21 | bold italic |
| markup.bold | — | bold |
| markup.italic | — | italic |
| punctuation.definition.link.description.begin.markdown, punctuation.definition.link.description.end.markdown, punctuation.definition.link.title.begin.markdown, punctuation.definition.link.title.end.markdown, string.other.link.title.markdown, string.other.link.description.markdown | #52e3f6 | underline |
| meta.link.reference.markdown punctuation.definition.link.title.begin.markdown, meta.link.reference.markdown punctuation.definition.link.title.end.markdown, meta.link.reference.markdown string.other.link.title.markdown, constant.other.reference.link.markdown, punctuation.definition.constant.markdown, punctuation.definition.constant.begin.markdown, punctuation.definition.constant.end.markdown | #ff007f | — |
| markup.underline.link | #79abff | underline |
| entity.name.tag.html, entity.name.tag.xml, entity.name.tag.localname.xml | #ff007f | bold |
| punctuation.definition.tag | #cfbfad | — |
| entity.other.attribute-name.html, entity.other.attribute-name.xml, entity.other.attribute-name.localname.xml | #a7ec21 | — |
| constant.character.entity | #bed6ff | — |
| keyword.control.flow.anchor.yaml, keyword.control.flow.alias.yaml, punctuation.definition.anchor.yaml, punctuation.definition.alias.yaml | #bed6ff | — |
| keyword.operator.heredoc.shell, punctuation.definition.string.heredoc.delimiter.shell | #fd971f | bold |
| invalid, invalid.deprecated | #bc3f3c | — |
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}!`;
}