Skip to main content
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 #ff000000 activityBar.background #0e0014 activityBar.border #ff000000 activityBar.foreground #cc00e8 activityBar.inactiveForeground #572c6d activityBarBadge.background #b300cc 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 #ffffff — variable.other.generic-type.haskell #a000c8 — storage.type.haskell #e4d937 — support.variable.magic.python
Shiki preview TypeScript sample highlighted with this variant's colors and tokenColors.
Lunar Color Theme — Lunar
activityBarBadge.foreground #ffffff
badge.background #761d79
badge.foreground #ffffff
breadcrumb.activeSelectionForeground #a0a0a0
breadcrumb.background #110d15
breadcrumb.focusForeground #a0a0a0
breadcrumb.foreground #80808080
button.background #420066
button.foreground #ffffff
button.hoverBackground #6a00a3
button.secondaryBackground #28003d
button.secondaryForeground #d9d9d9
button.secondaryHoverBackground #6a00a381
checkbox.background #0e0014
checkbox.border #ff000000
checkbox.foreground #cccccc
debugExceptionWidget.background #2b2230
debugExceptionWidget.border #463949
debugToolBar.background #2b2230
debugToolBar.border #463949
diffEditor.border #520060
diffEditor.insertedTextBackground #5db95532
diffEditor.removedTextBackground #ff006c20
dropdown.background #0e0014
dropdown.border #ff000000
dropdown.foreground #cccccc
editor.background #10061d
editor.findMatchBackground #515c6a
editor.findMatchBorder #74879f
editor.findMatchHighlightBackground #ea5c0055
editor.findMatchHighlightBorder #ffffff00
editor.findRangeHighlightBackground #3a3d4166
editor.findRangeHighlightBorder #ffffff00
editor.foldBackground #264f784d
editor.foreground #d4d4d4
editor.hoverHighlightBackground #264f7840
editor.inactiveSelectionBackground #3a3d4195
editor.lineHighlightBackground #ffffff0A
editor.lineHighlightBorder #282828
editor.rangeHighlightBackground #ffffff0b
editor.rangeHighlightBorder #ffffff00
editor.selectionBackground #263778c3
editor.selectionHighlightBackground #ade8ff36
editor.selectionHighlightBorder #5c9f9f
editor.wordHighlightBackground #575757b8
editor.wordHighlightStrongBackground #540072b8
editorBracketMatch.background #0064001a
editorBracketMatch.border #888888
editorCodeLens.foreground #6f9d986c
editorCursor.background #000000
editorCursor.foreground #4080b2
editorError.background #b73a3436
editorError.border #ffffff00
editorError.foreground #ff3636
editorGroup.border #520060
editorGroup.emptyBackground #10061d
editorGroupHeader.border #00000000
editorGroupHeader.tabsBackground #0e0014
editorGroupHeader.tabsBorder #520060
editorGutter.addedBackground #37b40a
editorGutter.background #110d15
editorGutter.commentRangeForeground #c5c5c5
editorGutter.deletedBackground #c0040d
editorGutter.foldingControlForeground #c5c5c5
editorGutter.modifiedBackground #0295be
editorHoverWidget.background #160a21
editorHoverWidget.border #5d3b79
editorHoverWidget.foreground #cccccc
editorIndentGuide.activeBackground1 #707070
editorIndentGuide.background1 #404040
editorInfo.background #4490BF00
editorInfo.border #4490BF00
editorInfo.foreground #75beff
editorLineNumber.activeForeground #59648e
editorLineNumber.foreground #59648e83
editorLink.activeForeground #4e94ce
editorMarkerNavigation.background #0e0014
editorMarkerNavigationError.background #9b250d
editorMarkerNavigationInfo.background #75beff
editorMarkerNavigationWarning.background #cca700
editorOverviewRuler.background #25252500
editorOverviewRuler.border #7f7f7f4d
editorRuler.foreground #5a5a5a
editorSuggestWidget.background #160a21
editorSuggestWidget.border #0c0060
editorSuggestWidget.foreground #d4d4d4
editorSuggestWidget.highlightForeground #40429ff3
editorSuggestWidget.selectedBackground #32064a66
editorWarning.background #A9904000
editorWarning.border #ffffff00
editorWarning.foreground #cca700
editorWhitespace.foreground #e3e4e229
editorWidget.background #252526
editorWidget.foreground #cccccc
editorWidget.resizeBorder #5F5F5F
focusBorder #520060
foreground #8741ab
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 #8741ab
input.background #0e0014
input.border #ff000000
input.foreground #cccccc
input.placeholderForeground #a6a6a6
inputOption.activeBackground #59008899
inputOption.activeBorder #0099ff00
inputOption.activeForeground #ffffff
list.activeSelectionBackground #5509717c
list.activeSelectionForeground #ffffff
list.dropBackground #3600525c
list.focusBackground #32064a
list.focusForeground #cccccc
list.highlightForeground #dc00fb
list.hoverBackground #360052c5
list.hoverForeground #cccccc
list.inactiveSelectionBackground #2b1e3666
list.inactiveSelectionForeground #cccccc
listFilterWidget.background #602365
listFilterWidget.noMatchesOutline #af00be
listFilterWidget.outline #00000000
menu.background #29003d
menu.border #00000000
menu.foreground #f9f9f9
menu.selectionBackground #85009e
menu.selectionBorder #00000000
menu.selectionForeground #ffffff
menu.separatorBackground #bbbbbb
menubar.selectionBackground #2e0037
menubar.selectionBorder #ff000000
menubar.selectionForeground #cccccc
merge.commonContentBackground #28282866
merge.commonHeaderBackground #38383866
merge.currentContentBackground #27403B66
merge.currentHeaderBackground #36736666
merge.incomingContentBackground #28384B66
merge.incomingHeaderBackground #395F8F66
minimap.background #10061d
minimap.errorHighlight #ff3636
minimap.findMatchHighlight #515c6a6d
minimap.selectionHighlight #263778c3
minimap.warningHighlight #cca700
minimapGutter.addedBackground #37b40a
minimapGutter.deletedBackground #c0040d
minimapGutter.modifiedBackground #0295be
notificationCenter.border #4e1656
notificationCenterHeader.background #30153b
notificationCenterHeader.foreground #cccccc
notifications.background #1b081f
notifications.border #0a010f
notifications.foreground #cccccc
notificationsErrorIcon.foreground #de5e45
notificationsInfoIcon.foreground #4aa3f2
notificationsWarningIcon.foreground #f0c70c
notificationToast.border #511c64
panel.background #0e0014
panel.border #520060
panelSection.border #80808059
panelTitle.activeBorder #e100ff
panelTitle.activeForeground #e7e7e7
panelTitle.inactiveForeground #e7e7e799
peekView.border #8c00cc
peekViewEditor.background #140a19
peekViewEditor.matchHighlightBackground #c700ff50
peekViewEditor.matchHighlightBorder #e71eee4e
peekViewEditorGutter.background #2100337a
peekViewResult.background #252526
peekViewResult.fileForeground #ffffff
peekViewResult.lineForeground #bbbbbb
peekViewResult.matchHighlightBackground #d800ea4d
peekViewResult.selectionBackground #3399ff33
peekViewResult.selectionForeground #ffffff
peekViewTitle.background #1e1e1e
peekViewTitleDescription.foreground #ccccccb3
peekViewTitleLabel.foreground #ffffff
pickerGroup.border #3f3f46
pickerGroup.foreground #9b37ff
progressBar.background #e100ff
scrollbar.shadow #00000000
scrollbarSlider.activeBackground #bfbfbf66
scrollbarSlider.background #4d425566
scrollbarSlider.hoverBackground #646464b3
selection.background #63557b
settings.focusedRowBackground #ffffff07
settings.headerForeground #8741ab
sideBar.background #1b0029
sideBar.border #520060
sideBar.dropBackground #3600525c
sideBar.foreground #b3aade
sideBarSectionHeader.background #00000000
sideBarSectionHeader.border #cccccc33
sideBarSectionHeader.foreground #d798e0
sideBarTitle.foreground #912e9f
statusBar.background #0e0014
statusBar.border #00000000
statusBar.debuggingBackground #250b4b
statusBar.debuggingBorder #e100ff
statusBar.debuggingForeground #a5a9ba
statusBar.foreground #a26cbe
statusBar.noFolderBackground #0e0014
statusBar.noFolderForeground #a26cbe
statusBarItem.activeBackground #FFFFFF25
statusBarItem.hoverBackground #43004e9b
statusBarItem.remoteBackground #410062
statusBarItem.remoteForeground #ffffff
tab.activeBackground #1b0029
tab.activeBorder #7d353500
tab.activeBorderTop #e100ff
tab.activeForeground #ffffff
tab.border #ff000000
tab.hoverBackground #24002a
tab.inactiveBackground #180a1f
tab.inactiveForeground #ffffff80
terminal.ansiBlack #4f4f4f
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 #e5e5e5
terminal.ansiYellow #e5e510
terminal.border #80808059
terminal.foreground #cccccc
terminal.selectionBackground #4b397d5a
terminalCursor.background #af00ff
terminalCursor.foreground #ffffff
textLink.foreground #ef37ff
titleBar.activeBackground #0e0014
titleBar.activeForeground #cccccc
titleBar.border #00000000
titleBar.inactiveBackground #0e0014
titleBar.inactiveForeground #cccccc
tree.indentGuidesStroke #585858
walkThrough.embeddedEditorBackground #00000050
widget.shadow #000000 #ffffff
punctuation.separator.period.python,punctuation.separator.element.python,punctuation.parenthesis.begin.python,punctuation.parenthesis.end.python #d4d4d4 —
variable.parameter.function.language.special.self.python #e8b658 —
storage.modifier.lifetime.rust #d4d4d4 —
support.function.std.rust #53ecff —
entity.name.lifetime.rust #e8b658 —
variable.language.rust #ffffff —
support.constant.edge #a000c8 —
constant.other.character-class.regexp #ffffff —
keyword.operator.quantifier.regexp #e4d937 —
punctuation.definition.string.begin,punctuation.definition.string.end #9ad172 —
variable.parameter.function #d4d4d4 —
comment markup.link #6f6f6f —
markup.changed.diff #e8b658 —
meta.diff.header.from-file,meta.diff.header.to-file,punctuation.definition.from-file.diff,punctuation.definition.to-file.diff #53ecff —
markup.inserted.diff #9ad172 —
markup.deleted.diff #ffffff —
meta.function.c,meta.function.cpp #ffffff —
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 #d4d4d4 —
punctuation.separator.key-value #d4d4d4 —
keyword.operator.expression.import #53ecff —
support.constant.math #e8b658 —
support.constant.property.math #e4d937 —
variable.other.constant #e8b658 —
storage.type.annotation.java, storage.type.object.array.java #e8b658 —
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 #d4d4d4 —
storage.modifier.import.java,storage.type.java,storage.type.generic.java #e8b658 —
keyword.operator.instanceof.java #a000c8 —
meta.definition.variable.name.java #ffffff —
keyword.operator.logical #59aaec —
keyword.operator.bitwise #59aaec —
keyword.operator.channel #59aaec —
support.constant.property-value.scss,support.constant.property-value.css #e4d937 —
keyword.operator.css,keyword.operator.scss,keyword.operator.less #59aaec —
support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss #e4d937 —
punctuation.separator.list.comma.css #d4d4d4 —
support.constant.color.w3c-standard-color-name.css #e4d937 —
support.type.vendored.property-name.css #59aaec —
support.module.node,support.type.object.module,support.module.node #e8b658 —
entity.name.type.module #e8b658 —
variable.other.readwrite,meta.object-literal.key,support.variable.property,support.variable.object.process,support.variable.object.node #ffffff —
support.constant.json #e4d937 —
keyword.operator.expression.instanceof, keyword.operator.new, keyword.operator.ternary, keyword.operator.optional, keyword.operator.expression.keyof #a000c8 —
support.type.object.console #ffffff —
support.variable.property.process #e4d937 —
entity.name.function,support.function.console #53ecff —
keyword.operator.misc.rust #d4d4d4 —
keyword.operator.sigil.rust #a000c8 —
keyword.operator.delete #a000c8 —
support.type.object.dom #59aaec —
support.variable.dom,support.variable.property.dom #ffffff —
keyword.operator.arithmetic,keyword.operator.comparison,keyword.operator.decrement,keyword.operator.increment,keyword.operator.relational #59aaec —
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 #a000c8 —
punctuation.separator.delimiter #d4d4d4 —
punctuation.separator.c,punctuation.separator.cpp #a000c8 —
support.type.posix-reserved.c,support.type.posix-reserved.cpp #59aaec —
keyword.operator.sizeof.c,keyword.operator.sizeof.cpp #a000c8 —
variable.parameter.function.language.python #e4d937 —
support.type.python #59aaec —
keyword.operator.logical.python #a000c8 —
variable.parameter.function.python #e4d937 —
punctuation.definition.arguments.begin.python,punctuation.definition.arguments.end.python,punctuation.separator.arguments.python,punctuation.definition.list.begin.python,punctuation.definition.list.end.python #d4d4d4 —
meta.function-call.generic.python #53ecff —
constant.character.format.placeholder.other.python #e4d937 —
keyword.operator.assignment.compound #a000c8 —
keyword.operator.assignment.compound.js,keyword.operator.assignment.compound.ts #59aaec —
entity.name.namespace #e8b658 —
variable.language #e8b658 —
token.variable.parameter.java #d4d4d4 —
import.storage.java #e8b658 —
token.package.keyword #a000c8 —
entity.name.function, meta.require, support.function.any-method, variable.function #53ecff —
entity.name.type.namespace #e8b658 —
support.class, entity.name.type.class #e8b658 —
entity.name.class.identifier.namespace.type #e8b658 —
entity.name.class, variable.other.class.js, variable.other.class.ts #e8b658 —
variable.other.class.php #ffffff —
control.elements, keyword.operator.less #e4d937 —
keyword.other.special-method #53ecff —
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 #a000c8 —
token.storage.type.java #e8b658 —
support.type.property-name #d4d4d4 —
support.constant.property-value #d4d4d4 —
support.constant.font-name #e4d937 —
entity.other.inherited-class #e8b658 —
constant.other.symbol #59aaec —
punctuation.definition.constant #e4d937 —
entity.other.attribute-name #e4d937 —
entity.other.attribute-name.id #53ecff
entity.other.attribute-name.class.css #e4d937 italic
markup.heading punctuation.definition.heading, entity.name.section #53ecff —
keyword.other.unit #ffffff —
markup.bold,todo.bold #e4d937 —
punctuation.definition.bold #e8b658 —
markup.italic, punctuation.definition.italic,todo.emphasis #a000c8 —
entity.name.section.markdown #ffffff —
punctuation.definition.heading.markdown #ffffff —
punctuation.definition.list.begin.markdown #ffffff —
markup.heading.setext #d4d4d4 —
punctuation.definition.bold.markdown #e4d937 —
markup.inline.raw.markdown #9ad172 —
markup.inline.raw.string.markdown #9ad172 —
punctuation.definition.list.markdown #ffffff —
punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown #ffffff —
beginning.punctuation.definition.list.markdown #ffffff —
punctuation.definition.metadata.markdown #ffffff —
markup.underline.link.markdown,markup.underline.link.image.markdown #a000c8 —
string.other.link.title.markdown,string.other.link.description.markdown #53ecff —
constant.character.escape #59aaec —
punctuation.section.embedded, variable.interpolation #ffffff —
punctuation.section.embedded.begin,punctuation.section.embedded.end #a000c8 —
invalid.illegal.bad-ampersand.html #d4d4d4 —
invalid.deprecated #ffffff —
invalid.unimplemented #ffffff —
source.json meta.structure.dictionary.json > string.quoted.json #ffffff —
source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string #ffffff —
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 #9ad172 —
source.json meta.structure.dictionary.json > constant.language.json,source.json meta.structure.array.json > constant.language.json #59aaec —
support.type.property-name.json #ffffff —
support.type.property-name.json punctuation #ffffff —
text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade #a000c8 —
text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade #a000c8 —
support.other.namespace.use.php,support.other.namespace.use-as.php,support.other.namespace.php,entity.other.alias.php,meta.interface.php #e8b658 —
keyword.operator.error-control.php #a000c8 —
keyword.operator.type.php #a000c8 —
punctuation.section.array.begin.php #d4d4d4 —
punctuation.section.array.end.php #d4d4d4 —
invalid.illegal.non-null-typehinted.php #f44747 —
storage.type.php,meta.other.type.phpdoc.php,keyword.other.type.php,keyword.other.array.phpdoc.php #e8b658 —
meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php #53ecff —
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 #d4d4d4 —
support.constant.core.rust #e4d937 —
support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php #e4d937 —
entity.name.goto-label.php,support.other.php #53ecff —
keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php #59aaec —
keyword.operator.regexp.php #a000c8 —
keyword.operator.comparison.php #59aaec —
keyword.operator.heredoc.php,keyword.operator.nowdoc.php #a000c8 —
meta.function.decorator.python #53ecff —
support.token.decorator.python,meta.function.decorator.identifier.python #59aaec —
function.parameter #d4d4d4 —
function.parameter.ruby, function.parameter.cs #d4d4d4 —
constant.language.symbol.ruby #59aaec —
inline-color-decoration rgb-value #e4d937 —
support.type.primitive.ts,support.type.builtin.ts,support.type.primitive.tsx,support.type.builtin.tsx #e8b658 —
block.scope.end,block.scope.begin #d4d4d4 —
entity.name.variable.local.cs #ffffff —
token.error-token #f44747 —
token.debug-token #a000c8 —
punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded #a000c8 —
meta.template.expression #d4d4d4 —
keyword.operator.module #a000c8 —
support.type.type.flowtype #53ecff —
support.type.primitive #e8b658 —
meta.property.object #ffffff —
variable.parameter.function.js #ffffff —
keyword.other.template.begin #9ad172 —
keyword.other.template.end #9ad172 —
keyword.other.substitution.begin #9ad172 —
keyword.other.substitution.end #9ad172 —
keyword.operator.assignment #59aaec —
keyword.operator.assignment.go #e8b658 —
keyword.operator.arithmetic.go, keyword.operator.address.go #a000c8 —
entity.name.package.go #e8b658 —
support.type.prelude.elm #59aaec —
support.constant.elm #e4d937 —
punctuation.quasi.element #a000c8 —
constant.character.entity #ffffff —
entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class #59aaec —
entity.global.clojure #e8b658 —
meta.symbol.clojure #ffffff —
constant.keyword.clojure #59aaec —
meta.arguments.coffee, variable.parameter.function.coffee #ffffff —
meta.scope.prerequisites.makefile #ffffff —
storage.modifier.import.groovy #e8b658 —
meta.method.groovy #53ecff —
meta.definition.variable.name.groovy #ffffff —
meta.definition.class.inherited.classes.groovy #9ad172 —
support.variable.semantic.hlsl #e8b658 —
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 #a000c8 —
text.variable, text.bracketed #ffffff —
support.type.swift, support.type.vb.asp #e8b658 —
entity.name.function.xi #e8b658 —
entity.name.class.xi #59aaec —
constant.character.character-class.regexp.xi #ffffff —
constant.regexp.xi #a000c8 —
keyword.control.xi #59aaec —
beginning.punctuation.definition.quote.markdown.xi #9ad172 —
beginning.punctuation.definition.list.markdown.xi #6f6f6f —
constant.character.xi #53ecff —
constant.other.color.rgb-value.xi #ffffff —
punctuation.definition.tag.xi #6f6f6f —
entity.name.label.cs, entity.name.scope-resolution.function.call, entity.name.scope-resolution.function.definition #e8b658 —
entity.name.label.cs, markup.heading.setext.1.markdown, markup.heading.setext.2.markdown #ffffff —
meta.brace.square #d4d4d4 —
comment, punctuation.definition.comment #6f6f6f italic
markup.quote.markdown #6f6f6f —
punctuation.definition.block.sequence.item.yaml #d4d4d4 —
constant.language.symbol.elixir #59aaec —
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
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 } !` ;
}
fetchUser.ts
index.ts
README.md
src
components
fetchUser.ts
src
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
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...
main*
Lunar Color Theme | Coding Theme
Button.tsx
31
~/my-project
$
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 } !` ;
}