Goland Dark Theme
Publisher: diamond2221Themes in package: 1
一款高度还原 JetBrains Goland Dark 深色配色风格的 VS Code 主题,支持 Go、TypeScript、JavaScript、Java、HTML、CSS/SCSS/Less、Vue、JSON、React (JSX/TSX) 的全面语法高亮。
一款高度还原 JetBrains Goland Dark 深色配色风格的 VS Code 主题,支持 Go、TypeScript、JavaScript、Java、HTML、CSS/SCSS/Less、Vue、JSON、React (JSX/TSX) 的全面语法高亮。
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 | #7A7E85 | italic |
| keyword, storage.type, storage.modifier | #CF8E6D | — |
| string, constant.other.symbol | #6AAB73 | — |
| variable, identifier | #CED0D6 | — |
| constant.numeric, constant.language.boolean | #2AACB8 | — |
| entity.name.function, support.function, meta.function-call | #56A8F5 | — |
| entity.name.type, support.type, storage.type.class | #B3AE60 | — |
| meta.class, meta.interface, meta.struct | #B3AE60 | — |
| constant.language, variable.language | #C77DBB | — |
| punctuation.separator, punctuation.terminator | #CED0D6 | — |
| meta.annotation, storage.type.annotation | #B3AE60 | — |
| entity.name.tag, support.class.component | #D5B778 | — |
| meta.tag.attributes, entity.other.attribute-name | #BCBEC4 | — |
| constant.character.escape | #42C3D4 | — |
| source.json meta.structure.dictionary.json support.type.property-name.json | #BCBEC4 | — |
| source.json string.quoted | #6AAB73 | — |
| source.json constant.numeric, source.json constant.language.boolean | #2AACB8 | — |
| source.yaml entity.name.tag.yaml | #BCBEC4 | — |
| source.yaml string.unquoted, source.yaml string.quoted | #6AAB73 | — |
| source.yaml constant.language.anchor, source.yaml constant.language.alias | #C77DBB | — |
| source.tsx entity.name.tag, source.jsx entity.name.tag | #D5B778 | — |
| source.tsx entity.other.attribute-name, source.jsx entity.other.attribute-name | #BCBEC4 | — |
| source.tsx string.quoted, source.jsx string.quoted | #6AAB73 | — |
| source.vue entity.name.tag, source.vue support.attribute.vue | #CF8E6D | — |
| source.vue string.quoted | #6AAB73 | — |
| source.vue keyword.control.directive.vue | #CF8E6D | — |
| source.css support.type.property-name, source.scss support.type.property-name, source.less support.type.property-name | #CED0D6 | — |
| source.css support.constant.property-value, source.scss support.constant.property-value, source.less support.constant.property-value | #6AAB73 | — |
| support.variable.node, support.constant.node | #C77DBB | — |
| markup.heading.markdown | #56A8F5 | bold |
| markup.bold.markdown | #CF8E6D | bold |
| markup.italic.markdown | #6AAB73 | italic |
| markup.inline.raw.markdown | #B3AE60 | italic |
| markup.link.markdown | #42C3D4 | underline |
| source.js keyword, source.ts keyword | #CF8E6D | — |
| source.js variable.other, source.ts variable.other | #CED0D6 | — |
| source.js string.quoted, source.ts string.quoted | #6AAB73 | — |
| source.js constant.numeric, source.ts constant.numeric | #2AACB8 | — |
| source.js entity.name.function, source.ts entity.name.function | #56A8F5 | — |
| variable.other.property, meta.property.object, meta.object-literal.key, support.type.property-name | #BCBEC4 | — |
| invalid, invalid.illegal | #FFFFFF | — |
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}!`;
}