Vercel Docs Theme
Publisher: aurorascharffThemes in package: 2
Dark and light themes for VSCode/Cursor matching the Vercel docs syntax highlighting
Dark and light themes for VSCode/Cursor matching the Vercel docs syntax highlighting
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 | #6b7280 | — |
| keyword, storage.modifier, storage.type, keyword.control | #d6336c | |
| keyword.operator | #d6336c | — |
| string, string.quoted, punctuation.definition.string.begin, punctuation.definition.string.end | #067a3d | — |
| constant.character, variable.language.this | #4f46e5 | — |
| constant.language | #111111 | — |
| variable.other.constant | #0070f3 | — |
| variable.other.readwrite | #171717 | — |
| variable.other.object | #0070f3 | — |
| variable.other.readwrite.alias | #171717 | — |
| entity.name.function, support.function, meta.function-call | #0070f3 | |
| variable.parameter | #171717 | |
| entity.name.tag | #067a3d | — |
| support.class.component | #0070f3 | — |
| entity.other.attribute-name | #7c3aed | |
| string.regexp, string.interpolated | #067a3d | — |
| punctuation, meta.brace, punctuation.definition.tag.begin, punctuation.definition.tag.end, punctuation.definition.tag | #171717 | — |
| constant.numeric, constant.numeric.decimal | #111111 | — |
| support.variable.property, variable.other.property | #171717 | — |
| support.type.primitive, support.type | #0070f3 | |
| entity.name.type, entity.name.class, entity.other.inherited-class | #7c3aed | — |
| punctuation.separator.key-value | #d6336c | — |
| meta.object-literal.key.tsx | #171717 | — |
| meta.jsx.children.tsx | #171717 | — |
| punctuation.definition.string.template.begin, punctuation.definition.string.template.end, string.template | #067a3d | — |
| punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end | #d6336c | — |
| markup.underline.link, string.other.link | #067a3d | — |
| markup.bold | #d6336c | bold |
| markup.italic | — | italic |
| markup.heading, entity.name.section | #7c3aed | bold |
| markup.deleted | #d6336c | — |
| markup.inserted | #067a3d | — |
| invalid, invalid.illegal | #ff0000 | — |
| meta.tag.sgml.doctype, meta.tag.metadata | #a0a0a0 | — |
| support.type.property-name.json | #d6336c | — |
| entity.name.tag.yaml | #d6336c | — |
| string.unquoted.plain.out.yaml, string.unquoted.plain.in.yaml, string.unquoted.block.yaml | #067a3d | — |
| constant.language.boolean.yaml, constant.language.null.yaml, constant.language.merge.yaml | #111111 | — |
| constant.numeric.integer.yaml, constant.numeric.float.yaml | #111111 | — |
| punctuation.definition.block.sequence.item.yaml | #171717 | — |
| entity.other.document.begin.yaml, entity.other.document.end.yaml | #6b7280 | — |
| variable.other.alias.yaml, punctuation.definition.alias.yaml | #7c3aed | — |
| entity.name.type.anchor.yaml, punctuation.definition.anchor.yaml, keyword.control.property.anchor.yaml | #7c3aed | — |
| keyword.control.flow.block-scalar.literal.yaml, keyword.control.flow.block-scalar.folded.yaml | #d6336c | — |
| storage.type.tag-handle.yaml, constant.other.tag.yaml | #0070f3 | — |
| punctuation.separator.key-value.mapping.yaml | #d6336c | — |
| comment.line.number-sign.yaml | #6b7280 | — |
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}!`;
}