inmmerce for VTEX
Publisher: commente.meThemes in package: 1
Tema, snippets e IntelliSense para quem constrói na VTEX
Tema, snippets e IntelliSense para quem constrói na VTEX
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, keyword.control, keyword.other, storage, storage.type, storage.modifier, keyword.control.at-rule, keyword.graphql, keyword.type.graphql, keyword.other.prisma, storage.type.prisma, keyword.other.special-method.dockerfile, keyword.other.dockerfile, meta.diff.header | #FF79C6 | — |
| keyword.control.import, keyword.control.export, keyword.control.from, keyword.control.import.from, keyword.control.import.python, keyword.other.import | #FF79C6 | italic |
| entity.name.function, support.function, meta.function-call entity.name.function, variable.function, entity.name.method, variable.graphql, entity.name.function.graphql, variable.other.assignment.prisma, variable.other.prisma, support.function.prisma, support.function.builtin.python, support.function.magic.python, support.type.python, entity.other.attribute-name.class.css, entity.other.attribute-name.id.css, entity.other.attribute-name.pseudo-class.css, entity.other.attribute-name.pseudo-element.css, entity.name.command.shell, support.function.shell, entity.name.function.shell, meta.function-call.shell | #50FA7B | — |
| entity.other.attribute-name, entity.other.attribute-name.html, meta.jsx.attribute entity.other.attribute-name, meta.tag entity.other.attribute-name | #50FA7B | italic |
| entity.name.type, entity.name.class, entity.name.namespace, entity.other.inherited-class, support.type, support.class, entity.name.type.interface, entity.name.type.alias, meta.object-literal.key, variable.other.property, support.variable.property, support.type.graphql, entity.name.type.graphql, entity.name.type.prisma, entity.name.type.model.prisma, support.type.primitive.prisma, support.type.property-name.css, variable.css, support.type.custom-property.name.css, support.type.property-name.json, support.type.property-name.toml, entity.name.tag.yaml, variable.other.env, keyword.other.definition.ini, variable.other.normal.shell, variable.other.special.shell, variable.other.positional.shell, punctuation.definition.variable.shell | #8BE9FD | — |
| entity.name.type.parameter, meta.type.parameters entity.name.type, variable.parameter.type | #8BE9FD | italic |
| string, string.quoted, string.template, string.unquoted, punctuation.definition.string, markup.underline.link, markup.inline.raw.markdown, markup.fenced_code.block.markdown, meta.property-value.css string, source.env string, string.quoted.single.env, string.quoted.double.env | #F1FA8C | — |
| constant.numeric, constant.language, constant.language.boolean, constant.language.null, constant.other, support.constant, variable.other.constant, variable.other.enummember, keyword.other.unit, string.regexp, constant.character.escape, keyword.operator.quantifier.regexp, constant.other.placeholder, meta.fstring.python constant, meta.embedded.line.python constant.other.placeholder | #BD93F9 | — |
| entity.name.tag, support.class.component, entity.name.function.decorator, entity.name.function.decorator.python, punctuation.definition.decorator.python, meta.decorator punctuation.decorator, entity.name.tag.css, entity.name.function.prisma, keyword.other.attribute.prisma, storage.type.attribute.prisma, entity.name.function.directive.graphql, entity.name.type.anchor.yaml, variable.other.alias.yaml, punctuation.definition.anchor.yaml, entity.name.section.toml | #FFB86C | — |
| markup.heading.1.markdown, markup.heading.2.markdown, markup.heading.setext.1.markdown, markup.heading.setext.2.markdown, markup.heading.3.markdown, markup.heading.4.markdown, markup.heading.5.markdown, markup.heading.6.markdown | #FFB86C | bold |
| variable, variable.other.readwrite, meta.definition.variable.name, text.html.markdown, meta.paragraph.markdown, support.constant.property-value.css, string.unquoted.plain.out.yaml, string.unquoted.plain.in.yaml, source.gitignore, string.other.ignore, meta.ignore | #F8F8F2 | — |
| variable.parameter, meta.function.parameters variable, variable.parameter.graphql, meta.arguments.graphql variable, entity.name.variable.parameter | #D2D2CC | italic |
| punctuation, meta.brace, punctuation.separator, punctuation.terminator, punctuation.accessor, keyword.operator, keyword.operator.arithmetic, keyword.operator.assignment, keyword.operator.logical, keyword.operator.comparison, keyword.operator.relational, keyword.operator.ternary, punctuation.definition.tag, punctuation.definition.heading.markdown, punctuation.definition.list.begin.markdown, punctuation.definition.bold.markdown, punctuation.definition.italic.markdown, punctuation.definition.quote.begin.markdown, punctuation.definition.metadata.markdown, fenced_code.block.language.markdown, punctuation.definition.markdown, keyword.operator.optional.prisma, keyword.operator.list.prisma, constant.character.wildcard.ignore, keyword.operator.negation.ignore, punctuation.separator.ignore | #9A9A94 | — |
| comment, comment.line, comment.block, comment.block.documentation, punctuation.definition.comment, markup.quote.markdown | #8F9ABB | italic |
| storage.type.class.jsdoc, entity.name.type.instance.jsdoc, comment.block.documentation storage.type, comment.block.documentation keyword, keyword.other.documentation, keyword.codetag.notation, comment keyword.codetag | #8F9ABB | italic bold |
| markup.bold, markup.bold.markdown | #FFFFFF | bold |
| markup.italic, markup.italic.markdown | #F8F8F2 | italic |
| string.other.link.title.markdown, string.other.link.description.markdown | #8BE9FD | — |
| invalid, invalid.illegal | #FF5555 | — |
| invalid.deprecated | #F1FA8C | strikethrough |
| markup.inserted, markup.inserted.diff | #69FF94 | — |
| markup.deleted, markup.deleted.diff | #FF5555 | — |
| support.class.component, support.class.component.tsx, support.class.component.jsx, support.class.component.js, entity.name.tag.namespace.tsx, entity.name.tag.namespace.jsx | #8BE9FD | — |
| punctuation.section.embedded.begin.tsx, punctuation.section.embedded.end.tsx, punctuation.section.embedded.begin.jsx, punctuation.section.embedded.end.jsx, punctuation.section.embedded.begin.js, punctuation.section.embedded.end.js, meta.embedded.expression.tsx punctuation.section.embedded, meta.jsx.children.tsx punctuation.section.embedded | #FF79C6 | — |
| punctuation.definition.tag.begin.tsx, punctuation.definition.tag.end.tsx, punctuation.definition.tag.begin.jsx, punctuation.definition.tag.end.jsx, punctuation.definition.tag.begin.html, punctuation.definition.tag.end.html | #9A9A94 | — |
| variable.graphql, variable.other.graphql, meta.variables.graphql variable, variable.parameter.graphql | #D2D2CC | italic |
| variable.language.this, variable.language.super, variable.language.this.js, variable.language.this.ts, variable.language.this.tsx, variable.language.special.self.python, variable.language.special.cls.python, variable.parameter.function.language.special.self.python, variable.parameter.function.language.special.cls.python | #BD93F9 | italic |
| storage.modifier.async, storage.modifier.async.ts, storage.modifier.async.tsx, storage.modifier.async.js, keyword.control.flow.await, keyword.other.await, keyword.control.flow.js, keyword.control.flow.ts, keyword.control.flow.tsx | #FF79C6 | italic |
| keyword.control.anchor.regexp, punctuation.definition.group.regexp, punctuation.definition.character-class.regexp, constant.other.character-class.regexp, constant.other.character-class.set.regexp, keyword.operator.or.regexp, keyword.operator.negation.regexp | #FFB86C | — |
| variable.other.readwrite.alias, variable.other.readwrite.alias.ts, variable.other.readwrite.alias.tsx, variable.other.readwrite.alias.js, meta.import variable.other.readwrite, meta.export variable.other.readwrite, meta.import support.type, variable.other.alias | #A4FFFF | italic |
| meta.definition.variable.name, meta.var.expr entity.name.function, meta.definition.function variable.other | #D6ACFF | — |
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}!`;
}