Skip to main content
Purple Star | Coding Theme
VS Code preview Full workbench mockup using this variant's colors and tokenColors.
colors Workbench UI color keys from the theme JSON colors map.
activityBar.activeBackground #d03ff9 activityBar.background #760bde activityBar.border #09fbd9 activityBar.foreground #00ffdb activityBar.inactiveForeground #00ffdb activityBarBadge.background #a900cc tokenColors TextMate scopes and font styles (syntax highlighting rules).
scope foreground fontStyle punctuation.definition.delayed.unison,punctuation.definition.list.begin.unison,punctuation.definition.list.end.unison,punctuation.definition.ability.begin.unison,punctuation.definition.ability.end.unison,punctuation.operator.assignment.as.unison,punctuation.separator.pipe.unison,punctuation.separator.delimiter.unison,punctuation.definition.hash.unison #ff0014 — variable.other.generic-type.haskell #bb00ff — storage.type.haskell #d19a66 — support.variable.magic.python
Shiki preview TypeScript sample highlighted with this variant's colors and tokenColors.
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}!`;
}
Purple Star — Purple Star
3
Open Editors fetchUser.ts index.ts README.md fetchUser.ts
index.ts
README.md
src main*
0 1
Copilot
Ln 5, Col 12
Spaces: 2
UTF-8
LF
TypeScript
Dark+
activityBarBadge.foreground
#ffffff
badge.background #bf00f5
badge.foreground #ffffff
breadcrumb.activeSelectionForeground #00ffdb
breadcrumb.background #2a0841
breadcrumb.focusForeground #00ffdb
breadcrumb.foreground #fffffff7
button.background #5c8c21
button.foreground #f7f7f7
button.hoverBackground #669d24
button.secondaryBackground #710e8c
button.secondaryForeground #ffffff
button.secondaryHoverBackground #590f6d
checkbox.background #240047
checkbox.border #ffffff00
checkbox.foreground #8bff00
debugExceptionWidget.background #160326
debugExceptionWidget.border #00ffdb
debugToolBar.background #160326
debugToolBar.border #00ffdb
diffEditor.border #444444
diffEditor.insertedTextBackground #08ff0044
diffEditor.removedTextBackground #ff000033
dropdown.background #240047
dropdown.border #ffffff00
dropdown.foreground #8bff00
editor.background #350362
editor.findMatchBackground #00ffdb
editor.findMatchBorder #00ffdb
editor.findMatchHighlightBackground #00ffdb7a
editor.findMatchHighlightBorder #cd1f1f00
editor.findRangeHighlightBackground #7f4f9466
editor.findRangeHighlightBorder #5e5e5e00
editor.foldBackground #d10d3250
editor.foreground #ffffff
editor.hoverHighlightBackground #264f7840
editor.inactiveSelectionBackground #3a254b
editor.lineHighlightBackground #af00ff3a
editor.lineHighlightBorder #00ffdb93
editor.rangeHighlightBackground #ffffff0b
editor.rangeHighlightBorder #04040400
editor.selectionBackground #5b2678
editor.selectionHighlightBackground #a95ae068
editor.selectionHighlightBorder #00ffdb58
editor.wordHighlightBackground #710ec2b8
editor.wordHighlightBorder #00ffdb
editor.wordHighlightStrongBackground #710ec2b8
editor.wordHighlightStrongBorder #00ffdb
editorBracketMatch.background #ffffff1a
editorBracketMatch.border #00ffdbdf
editorCodeLens.foreground #999999
editorCursor.background #6800ff
editorCursor.foreground #81b60c
editorError.background #B73A3400
editorError.border #ffffff00
editorError.foreground #ff2b00
editorGroup.border #00fffb
editorGroup.emptyBackground #350362
editorGroupHeader.border #00ffdb
editorGroupHeader.tabsBackground #240047
editorGroupHeader.tabsBorder #00ffdb
editorGutter.addedBackground #587c0c
editorGutter.background #1d0038
editorGutter.commentRangeForeground #c92626
editorGutter.deletedBackground #94151b
editorGutter.foldingControlForeground #c92626
editorGutter.modifiedBackground #a11298
editorHoverWidget.background #2b1141
editorHoverWidget.border #00ffdb58
editorHoverWidget.foreground #00ffdb
editorIndentGuide.activeBackground #00ffdb
editorIndentGuide.background #6800ff99
editorInfo.background #4490BF00
editorInfo.border #4490BF00
editorInfo.foreground #794dd9
editorLineNumber.activeForeground #ff00ef
editorLineNumber.foreground #00ffdb
editorLink.activeForeground #e259ff
editorMarkerNavigation.background #3b0a45
editorMarkerNavigationError.background #1e7175
editorMarkerNavigationInfo.background #1e7175
editorMarkerNavigationWarning.background #249264
editorOverviewRuler.background #25252500
editorOverviewRuler.border #7f7f7f4d
editorRuler.foreground #ffffff00
editorSuggestWidget.background #31033b
editorSuggestWidget.border #00ffdb
editorSuggestWidget.foreground #00ffdb
editorSuggestWidget.highlightForeground #bf4ef2
editorSuggestWidget.selectedBackground #254045
editorWarning.background #A9904000
editorWarning.border #ffffff00
editorWarning.foreground #ffd101
editorWhitespace.foreground #ffffff52
editorWidget.background #240047
editorWidget.foreground #ffffff
editorWidget.resizeBorder #00ffdb
focusBorder #00ffdb
foreground #00ffdb
gitDecoration.addedResourceForeground #81b88b
gitDecoration.conflictingResourceForeground #6c6cc4
gitDecoration.deletedResourceForeground #c74e39
gitDecoration.ignoredResourceForeground #8c8c8c
gitDecoration.modifiedResourceForeground #e2c08d
gitDecoration.stageDeletedResourceForeground #c74e39
gitDecoration.stageModifiedResourceForeground #e2c08d
gitDecoration.submoduleResourceForeground #8db9e2
gitDecoration.untrackedResourceForeground #73c991
icon.foreground #00ffdb
input.background #240047
input.border #ffffff00
input.foreground #8bff00
input.placeholderForeground #178474
inputOption.activeBackground #116f8c66
inputOption.activeBorder #1a5454fd
inputOption.activeForeground #ffffff
list.activeSelectionBackground #208bab
list.activeSelectionForeground #ffffff
list.dropBackground #2f005c
list.focusBackground #240047
list.focusForeground #ffffff
list.highlightForeground #00ffff
list.hoverBackground #6929b6
list.hoverForeground #ffffff
list.inactiveSelectionBackground #136b6b
list.inactiveSelectionForeground #ffffff
listFilterWidget.background #a900cc
listFilterWidget.noMatchesOutline #74ff00
listFilterWidget.outline #02c4ff83
menu.background #350a58
menu.border #ff00cb58
menu.foreground #00ffdb
menu.selectionBackground #690971
menu.selectionBorder #00ffdb
menu.selectionForeground #00ffdb
menu.separatorBackground #8204d7
menubar.selectionBackground #a900ccb9
menubar.selectionBorder #00ffdb
menubar.selectionForeground #00ffdb
merge.commonContentBackground #282828
merge.commonHeaderBackground #564d4d
merge.currentContentBackground #27403B
merge.currentHeaderBackground #367366
merge.incomingContentBackground #49336b
merge.incomingHeaderBackground #6c398f
minimap.background #350362
minimap.errorHighlight #ff2b00
minimap.findMatchHighlight #00ffdb
minimap.selectionHighlight #5b2678
minimap.warningHighlight #ffd101
minimapGutter.addedBackground #587c0c
minimapGutter.deletedBackground #94151b
minimapGutter.modifiedBackground #a11298
notificationCenter.border #00ffdb
notificationCenterHeader.background #1a072c
notificationCenterHeader.foreground #00ffdb
notifications.background #2a0f41
notifications.border #5e039d
notifications.foreground #00ffdb
notificationsErrorIcon.foreground #ff0000
notificationsInfoIcon.foreground #75beff
notificationsWarningIcon.foreground #cca700
notificationToast.border #00ffdb
panel.background #240047
panel.border #00ffdb
panelSection.border #eb00ffa1
panelTitle.activeBorder #00ffdb
panelTitle.activeForeground #00ffdb
panelTitle.inactiveForeground #f700ffc1
peekView.border #ad1ccb
peekViewEditor.background #330b45
peekViewEditor.matchHighlightBackground #09261499
peekViewEditor.matchHighlightBorder #1ed1ee
peekViewEditorGutter.background #330b45
peekViewResult.background #230636
peekViewResult.fileForeground #ffffff
peekViewResult.lineForeground #bbbbbb
peekViewResult.matchHighlightBackground #ea5c004d
peekViewResult.selectionBackground #3399ff33
peekViewResult.selectionForeground #ffffff
peekViewTitle.background #1e1e1e
peekViewTitleDescription.foreground #ccccccb3
peekViewTitleLabel.foreground #ffffff
pickerGroup.border #00ffdb
pickerGroup.foreground #bd0be2
progressBar.background #00ffdb
scrollbar.shadow #414d47
scrollbarSlider.activeBackground #00ffdb66
scrollbarSlider.background #00ffdb2c
scrollbarSlider.hoverBackground #00ffdb64
selection.background #ba76e8
settings.focusedRowBackground #ffffff07
settings.headerForeground #00ffdb
sideBar.background #8100ff
sideBar.border #00ffdb
sideBar.dropBackground #2f005c
sideBar.foreground #00ffdb
sideBarSectionHeader.background #41427d
sideBarSectionHeader.border #2e005a
sideBarSectionHeader.foreground #00ffdb
sideBarTitle.foreground #00ffdb
statusBar.background #240047
statusBar.border #00ffdb
statusBar.debuggingBackground #6c116f
statusBar.debuggingBorder #00ffdb
statusBar.debuggingForeground #00ffdb
statusBar.foreground #00ffdb
statusBar.noFolderBackground #0d303b
statusBar.noFolderBorder #00ffdb
statusBar.noFolderForeground #ffffff
statusBarItem.activeBackground #FFFFFF25
statusBarItem.hoverBackground #a900cc
statusBarItem.remoteBackground #66028a
statusBarItem.remoteForeground #00ffdb
tab.activeBackground #400d8a
tab.activeBorder #00ffdb
tab.activeBorderTop #771d1d00
tab.activeForeground #00ffdb
tab.border #00ffdb
tab.hoverBackground #2b0760
tab.hoverBorder #00ffdb
tab.hoverForeground #00ffdb
tab.inactiveBackground #0d3f3aa7
tab.inactiveForeground #ffffff
terminal.ansiBlack #9a00e0
terminal.ansiBlue #2472c8
terminal.ansiBrightBlack #666666
terminal.ansiBrightBlue #3b8eea
terminal.ansiBrightCyan #29b8db
terminal.ansiBrightGreen #23d18b
terminal.ansiBrightMagenta #d670d6
terminal.ansiBrightRed #f14c4c
terminal.ansiBrightWhite #e5e5e5
terminal.ansiBrightYellow #f5f543
terminal.ansiCyan #11a8cd
terminal.ansiGreen #0dbc79
terminal.ansiMagenta #bc3fbc
terminal.ansiRed #cd3131
terminal.ansiWhite #ffffff
terminal.ansiYellow #e5e510
terminal.border #eb00ffa1
terminal.foreground #00ffdb
terminal.selectionBackground #ffffff40
terminalCursor.background #672bb0
terminalCursor.foreground #8bff00
textLink.foreground #dd0fe4
titleBar.activeBackground #240047
titleBar.activeForeground #00ffdb
titleBar.border #00ffdb
titleBar.inactiveBackground #24004758
titleBar.inactiveForeground #cccccc99
tree.indentGuidesStroke #6a56cd
walkThrough.embeddedEditorBackground #00000050
widget.shadow #00ffdb4a #ff0014
punctuation.separator.period.python,punctuation.separator.element.python,punctuation.parenthesis.begin.python,punctuation.parenthesis.end.python #ffffff —
variable.parameter.function.language.special.self.python #e5c07b —
storage.modifier.lifetime.rust #ffffff —
support.function.std.rust #008cff —
entity.name.lifetime.rust #e5c07b —
variable.language.rust #ff0014 —
support.constant.edge #bb00ff —
constant.other.character-class.regexp #ff0014 —
keyword.operator.quantifier.regexp #d19a66 —
punctuation.definition.string.begin,punctuation.definition.string.end #6bff00 —
variable.parameter.function #ffffff —
comment markup.link #aeb4c0 —
markup.changed.diff #e5c07b —
meta.diff.header.from-file,meta.diff.header.to-file,punctuation.definition.from-file.diff,punctuation.definition.to-file.diff #008cff —
markup.inserted.diff #6bff00 —
markup.deleted.diff #ff0014 —
meta.function.c,meta.function.cpp #ff0014 —
punctuation.section.block.begin.bracket.curly.cpp,punctuation.section.block.end.bracket.curly.cpp,punctuation.terminator.statement.c,punctuation.section.block.begin.bracket.curly.c,punctuation.section.block.end.bracket.curly.c,punctuation.section.parens.begin.bracket.round.c,punctuation.section.parens.end.bracket.round.c,punctuation.section.parameters.begin.bracket.round.c,punctuation.section.parameters.end.bracket.round.c #ffffff —
punctuation.separator.key-value #ffffff —
keyword.operator.expression.import #008cff —
support.constant.math #e5c07b —
support.constant.property.math #d19a66 —
variable.other.constant #e5c07b —
storage.type.annotation.java, storage.type.object.array.java #e5c07b —
punctuation.section.block.begin.java,punctuation.section.block.end.java,punctuation.definition.method-parameters.begin.java,punctuation.definition.method-parameters.end.java,meta.method.identifier.java,punctuation.section.method.begin.java,punctuation.section.method.end.java,punctuation.terminator.java,punctuation.section.class.begin.java,punctuation.section.class.end.java,punctuation.section.inner-class.begin.java,punctuation.section.inner-class.end.java,meta.method-call.java,punctuation.section.class.begin.bracket.curly.java,punctuation.section.class.end.bracket.curly.java,punctuation.section.method.begin.bracket.curly.java,punctuation.section.method.end.bracket.curly.java,punctuation.separator.period.java,punctuation.bracket.angle.java,punctuation.definition.annotation.java,meta.method.body.java #ffffff —
storage.modifier.import.java,storage.type.java,storage.type.generic.java #e5c07b —
keyword.operator.instanceof.java #bb00ff —
meta.definition.variable.name.java #ff0014 —
keyword.operator.logical #00e3ff —
keyword.operator.bitwise #00e3ff —
keyword.operator.channel #00e3ff —
support.constant.property-value.scss,support.constant.property-value.css #d19a66 —
keyword.operator.css,keyword.operator.scss,keyword.operator.less #00e3ff —
support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss #d19a66 —
punctuation.separator.list.comma.css #ffffff —
support.constant.color.w3c-standard-color-name.css #d19a66 —
support.type.vendored.property-name.css #00e3ff —
support.module.node,support.type.object.module,support.module.node #e5c07b —
entity.name.type.module #e5c07b —
variable.other.readwrite,meta.object-literal.key,support.variable.property,support.variable.object.process,support.variable.object.node #ff0014 —
support.constant.json #d19a66 —
keyword.operator.expression.instanceof, keyword.operator.new, keyword.operator.ternary, keyword.operator.optional, keyword.operator.expression.keyof #bb00ff —
support.type.object.console #ff0014 —
support.variable.property.process #d19a66 —
entity.name.function,support.function.console #008cff —
keyword.operator.misc.rust #ffffff —
keyword.operator.sigil.rust #bb00ff —
keyword.operator.delete #bb00ff —
support.type.object.dom #00e3ff —
support.variable.dom,support.variable.property.dom #ff0014 —
keyword.operator.arithmetic,keyword.operator.comparison,keyword.operator.decrement,keyword.operator.increment,keyword.operator.relational #00e3ff —
keyword.operator.assignment.c,keyword.operator.comparison.c,keyword.operator.c,keyword.operator.increment.c,keyword.operator.decrement.c,keyword.operator.bitwise.shift.c,keyword.operator.assignment.cpp,keyword.operator.comparison.cpp,keyword.operator.cpp,keyword.operator.increment.cpp,keyword.operator.decrement.cpp,keyword.operator.bitwise.shift.cpp #bb00ff —
punctuation.separator.delimiter #ffffff —
punctuation.separator.c,punctuation.separator.cpp #bb00ff —
support.type.posix-reserved.c,support.type.posix-reserved.cpp #00e3ff —
keyword.operator.sizeof.c,keyword.operator.sizeof.cpp #bb00ff —
variable.parameter.function.language.python #d19a66 —
support.type.python #00e3ff —
keyword.operator.logical.python #bb00ff —
variable.parameter.function.python #d19a66 —
punctuation.definition.arguments.begin.python,punctuation.definition.arguments.end.python,punctuation.separator.arguments.python,punctuation.definition.list.begin.python,punctuation.definition.list.end.python #ffffff —
meta.function-call.generic.python #008cff —
constant.character.format.placeholder.other.python #d19a66 —
keyword.operator.assignment.compound #bb00ff —
keyword.operator.assignment.compound.js,keyword.operator.assignment.compound.ts #00e3ff —
entity.name.namespace #e5c07b —
variable.language #e5c07b —
token.variable.parameter.java #ffffff —
import.storage.java #e5c07b —
token.package.keyword #bb00ff —
entity.name.function, meta.require, support.function.any-method, variable.function #008cff —
entity.name.type.namespace #e5c07b —
support.class, entity.name.type.class #e5c07b —
entity.name.class.identifier.namespace.type #e5c07b —
entity.name.class, variable.other.class.js, variable.other.class.ts #e5c07b —
variable.other.class.php #ff0014 —
control.elements, keyword.operator.less #d19a66 —
keyword.other.special-method #008cff —
keyword.operator.expression.delete,keyword.operator.expression.in,keyword.operator.expression.of,keyword.operator.expression.instanceof,keyword.operator.new,keyword.operator.expression.typeof,keyword.operator.expression.void #bb00ff —
token.storage.type.java #e5c07b —
support.type.property-name #ffffff —
support.constant.property-value #ffffff —
support.constant.font-name #d19a66 —
entity.other.inherited-class #e5c07b —
constant.other.symbol #00e3ff —
punctuation.definition.constant #d19a66 —
entity.other.attribute-name #d19a66 —
entity.other.attribute-name.id #008cff normal
entity.other.attribute-name.class.css #d19a66 normal
markup.heading punctuation.definition.heading, entity.name.section #008cff —
keyword.other.unit #ff0014 —
markup.bold,todo.bold #d19a66 —
punctuation.definition.bold #e5c07b —
markup.italic, punctuation.definition.italic,todo.emphasis #bb00ff —
entity.name.section.markdown #ff0014 —
punctuation.definition.heading.markdown #ff0014 —
punctuation.definition.list.begin.markdown #ff0014 —
markup.heading.setext #ffffff —
punctuation.definition.bold.markdown #d19a66 —
markup.inline.raw.markdown #6bff00 —
markup.inline.raw.string.markdown #6bff00 —
punctuation.definition.list.markdown #ff0014 —
punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown #ff0014 —
beginning.punctuation.definition.list.markdown #ff0014 —
punctuation.definition.metadata.markdown #ff0014 —
markup.underline.link.markdown,markup.underline.link.image.markdown #bb00ff —
string.other.link.title.markdown,string.other.link.description.markdown #008cff —
constant.character.escape #00e3ff —
punctuation.section.embedded, variable.interpolation #ff0014 —
punctuation.section.embedded.begin,punctuation.section.embedded.end #bb00ff —
invalid.illegal.bad-ampersand.html #ffffff —
invalid.deprecated #ffffff —
invalid.unimplemented #ffffff —
source.json meta.structure.dictionary.json > string.quoted.json #ff0014 —
source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string #ff0014 —
source.json meta.structure.dictionary.json > value.json > string.quoted.json,source.json meta.structure.array.json > value.json > string.quoted.json,source.json meta.structure.dictionary.json > value.json > string.quoted.json > punctuation,source.json meta.structure.array.json > value.json > string.quoted.json > punctuation #6bff00 —
source.json meta.structure.dictionary.json > constant.language.json,source.json meta.structure.array.json > constant.language.json #00e3ff —
support.type.property-name.json #ff0014 —
support.type.property-name.json punctuation #ff0014 —
text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade #bb00ff —
text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade #bb00ff —
support.other.namespace.use.php,support.other.namespace.use-as.php,support.other.namespace.php,entity.other.alias.php,meta.interface.php #e5c07b —
keyword.operator.error-control.php #bb00ff —
keyword.operator.type.php #bb00ff —
punctuation.section.array.begin.php #ffffff —
punctuation.section.array.end.php #ffffff —
invalid.illegal.non-null-typehinted.php #f44747 —
storage.type.php,meta.other.type.phpdoc.php,keyword.other.type.php,keyword.other.array.phpdoc.php #e5c07b —
meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php #008cff —
punctuation.definition.parameters.begin.bracket.round.php,punctuation.definition.parameters.end.bracket.round.php,punctuation.separator.delimiter.php,punctuation.section.scope.begin.php,punctuation.section.scope.end.php,punctuation.terminator.expression.php,punctuation.definition.arguments.begin.bracket.round.php,punctuation.definition.arguments.end.bracket.round.php,punctuation.definition.storage-type.begin.bracket.round.php,punctuation.definition.storage-type.end.bracket.round.php,punctuation.definition.array.begin.bracket.round.php,punctuation.definition.array.end.bracket.round.php,punctuation.definition.begin.bracket.round.php,punctuation.definition.end.bracket.round.php,punctuation.definition.begin.bracket.curly.php,punctuation.definition.end.bracket.curly.php,punctuation.definition.section.switch-block.end.bracket.curly.php,punctuation.definition.section.switch-block.start.bracket.curly.php,punctuation.definition.section.switch-block.begin.bracket.curly.php,punctuation.definition.section.switch-block.end.bracket.curly.php #ffffff —
support.constant.core.rust #d19a66 —
support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php #d19a66 —
entity.name.goto-label.php,support.other.php #008cff —
keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php #00e3ff —
keyword.operator.regexp.php #bb00ff —
keyword.operator.comparison.php #00e3ff —
keyword.operator.heredoc.php,keyword.operator.nowdoc.php #bb00ff —
meta.function.decorator.python #008cff —
support.token.decorator.python,meta.function.decorator.identifier.python #00e3ff —
function.parameter #ffffff —
function.parameter.ruby, function.parameter.cs #ffffff —
constant.language.symbol.ruby #00e3ff —
inline-color-decoration rgb-value #d19a66 —
support.type.primitive.ts,support.type.builtin.ts,support.type.primitive.tsx,support.type.builtin.tsx #e5c07b —
block.scope.end,block.scope.begin #ffffff —
entity.name.variable.local.cs #ff0014 —
token.error-token #f44747 —
token.debug-token #bb00ff —
punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded #bb00ff —
meta.template.expression #ffffff —
keyword.operator.module #bb00ff —
support.type.type.flowtype #008cff —
support.type.primitive #e5c07b —
meta.property.object #ff0014 —
variable.parameter.function.js #ff0014 —
keyword.other.template.begin #6bff00 —
keyword.other.template.end #6bff00 —
keyword.other.substitution.begin #6bff00 —
keyword.other.substitution.end #6bff00 —
keyword.operator.assignment #00e3ff —
keyword.operator.assignment.go #e5c07b —
keyword.operator.arithmetic.go, keyword.operator.address.go #bb00ff —
entity.name.package.go #e5c07b —
support.type.prelude.elm #00e3ff —
support.constant.elm #d19a66 —
punctuation.quasi.element #bb00ff —
constant.character.entity #ff0014 —
entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class #00e3ff —
entity.global.clojure #e5c07b —
meta.symbol.clojure #ff0014 —
constant.keyword.clojure #00e3ff —
meta.arguments.coffee, variable.parameter.function.coffee #ff0014 —
meta.scope.prerequisites.makefile #ff0014 —
storage.modifier.import.groovy #e5c07b —
meta.method.groovy #008cff —
meta.definition.variable.name.groovy #ff0014 —
meta.definition.class.inherited.classes.groovy #6bff00 —
support.variable.semantic.hlsl #e5c07b —
support.type.texture.hlsl, support.type.sampler.hlsl, support.type.object.hlsl, support.type.object.rw.hlsl, support.type.fx.hlsl, support.type.object.hlsl #bb00ff —
text.variable, text.bracketed #ff0014 —
support.type.swift, support.type.vb.asp #e5c07b —
entity.name.function.xi #e5c07b —
entity.name.class.xi #00e3ff —
constant.character.character-class.regexp.xi #ff0014 —
constant.regexp.xi #bb00ff —
keyword.control.xi #00e3ff —
beginning.punctuation.definition.quote.markdown.xi #6bff00 —
beginning.punctuation.definition.list.markdown.xi #aeb4c0 —
constant.character.xi #008cff —
constant.other.color.rgb-value.xi #ffffff —
punctuation.definition.tag.xi #aeb4c0 —
entity.name.label.cs, entity.name.scope-resolution.function.call, entity.name.scope-resolution.function.definition #e5c07b —
entity.name.label.cs, markup.heading.setext.1.markdown, markup.heading.setext.2.markdown #ff0014 —
meta.brace.square #ffffff —
comment, punctuation.definition.comment #aeb4c0 italic
markup.quote.markdown #aeb4c0 —
punctuation.definition.block.sequence.item.yaml #ffffff —
constant.language.symbol.elixir #00e3ff —
entity.other.attribute-name.js,entity.other.attribute-name.ts,entity.other.attribute-name.jsx,entity.other.attribute-name.tsx,variable.parameter,variable.language.super — italic
comment.line.double-slash,comment.block.documentation — italic
keyword.control.import.python,keyword.control.flow.python — italic
markup.italic.markdown — italic
fetchUser.ts Button.tsx Modal.tsx hooks utils index.ts public package.json tsconfig.json README.md Outline components
fetchUser.ts
fetchUser
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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}!`;
}
Problems1
Output
Debug Console
Terminal
Ports
~/my-project $ pnpm dev
▲ Next.js ready on http://localhost:3000
✓ compiled client and server successfully in 412ms
wait - compiling /theme/vscode...
~/my-project $