Monokai Prime
Publisher: Nicholas HoekstraThemes in package: 1
Monokai theme with Dark+ base
Monokai theme with Dark+ base
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 |
|---|---|---|
| meta.embedded, source.groovy.embedded | #f8f8f2 | — |
| comment | #75715e | — |
| string | #e6db74 | — |
| punctuation.definition.template-expression, punctuation.section.embedded | #f92672 | — |
| punctuation.definition.list.begin.markdown | #66d9ef | — |
| variable.other.bracket.shell, variable.other.readwrite.shell, meta.group.expansion.command.parens.shell, variable.other.normal.shell, string.interpolated.dollar.shell, meta.function.shell punctuation.section.parens.begin.shell, meta.function.shell punctuation.section.parens.end.shell, string.other.math.shell | #f8f8f2 | — |
| variable.parameter.option.shell, punctuation.definition.variable.shell, punctuation.section.expansion.parameter.begin.shell, punctuation.section.expansion.parameter.end.shell, punctuation.section.parens.begin.shell, punctuation.section.parens.end.shell, string.interpolated.dollar.shell punctuation.definition.string.begin.shell, string.interpolated.dollar.shell punctuation.definition.string.end.shell, string.other.math.shell punctuation.definition.string.begin.shell, string.other.math.shell punctuation.definition.string.end.shell | #f92672 | — |
| beginning.punctuation.definition.list.markdown, punctuation.definition.list_item.markdown, punctuation.definition.list.markdown, punctuation.definition.heading.markdown, punctuation.definition.bold.markdown, punctuation.definition.italic.markdown, punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.bold.begin.markdown, punctuation.definition.bold.end.markdown, punctuation.definition.italic.begin.markdown, punctuation.definition.italic.end.markdown, punctuation.definition.heading.begin.markdown, punctuation.definition.heading.end.markdown, punctuation.definition.raw.begin.markdown, punctuation.definition.raw.end.markdown, punctuation.definition.metadata.markdown, punctuation.definition.raw.markdown, markup.underline.link.image.markdown, markup.underline.link.markdown | #75715e | — |
| meta.template.expression | #f8f8f2 | — |
| constant.numeric | #ae81ff | — |
| constant.language, constant.character, constant.other | #ae81ff | — |
| variable | #f8f8f2 | |
| variable.language | #fd971f | — |
| keyword | #f92672 | — |
| storage | #f92672 | |
| storage.type | #66d9ef | italic |
| entity.name.type, entity.name.class | #a6e22e | underline |
| entity.other.inherited-class | #a6e22e | italic underline |
| entity.name.function | #a6e22e | |
| variable.parameter | #fd971f | italic |
| entity.name.tag | #f92672 | |
| entity.other.attribute-name | #a6e22e | |
| support.function | #66d9ef | |
| support.constant | #66d9ef | |
| support.type, support.class | #66d9ef | italic |
| support.other.variable | — | |
| invalid | #F8F8F0 | |
| invalid.deprecated | #F8F8F0 | — |
| meta.structure.dictionary.json string.quoted.double.json | #cfcfc2 | — |
| meta.diff, meta.diff.header | #75715e | — |
| markup.deleted | #f92672 | — |
| markup.inserted | #a6e22e | — |
| markup.changed | #e6db74 | — |
| constant.numeric.line-number.find-in-files - match | #ae81ffA0 | — |
| entity.name.filename.find-in-files | #e6db74 | — |
| markup.quote | #f92672 | — |
| markup.bold, markup.italic | #66d9ef | — |
| markup.inline.raw | #ae81ff | |
| markup.heading | #a6e22e | — |
| markup.heading.setext | #a6e22e | |
| token.info-token | #6796e6 | — |
| token.warn-token | #cd9731 | — |
| token.error-token | #f44747 | — |
| token.debug-token | #b267e6 | — |
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}!`;
}