Skip to main content
Home Theme VS Code Phosphor Theme A dark theme for VS Code from the Phosphor Icons team
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 #00000000 activityBar.background #2a2926 activityBar.border #343330 activityBar.foreground #d2d6c5 activityBar.inactiveForeground #656461 activityBarBadge.background #825b61 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 #eeeae3 — variable.other.generic-type.haskell #ab989b — storage.type.haskell #f8c666 — support.variable.magic.python
Shiki preview TypeScript sample highlighted with this variant's colors and tokenColors.
Phosphor Theme — Phosphor Dark Min Phosphor Theme | Coding Theme
activityBarBadge.foreground
#000000
badge.background #825b61
badge.foreground #2a2926
breadcrumb.activeSelectionForeground #c9c5bf
breadcrumb.background #343330
breadcrumb.focusForeground #c9c5bf
breadcrumb.foreground #656461
button.background #825b61
button.foreground #eeeae3
button.hoverBackground #a97a81
button.secondaryBackground #3e3d3a
button.secondaryForeground #eeeae3
button.secondaryHoverBackground #656461
checkbox.background #2a2926
checkbox.border #a4b55b
checkbox.foreground #c9c5bf
debugExceptionWidget.background #343330
debugExceptionWidget.border #3e3d3a
debugToolBar.background #343330
debugToolBar.border #3e3d3a
diffEditor.border #343330
diffEditor.insertedTextBackground #50582e78
diffEditor.insertedTextBorder #4b512e
diffEditor.removedTextBackground #825b6146
diffEditor.removedTextBorder #825b6176
dropdown.background #2a2926
dropdown.border #a4b55b
dropdown.foreground #c9c5bf
editor.background #2a2926
editor.findMatchBackground #825b6191
editor.findMatchBorder #f2cbd17e
editor.findMatchHighlightBackground #825b616a
editor.findMatchHighlightBorder #ffffff00
editor.findRangeHighlightBackground #343330
editor.findRangeHighlightBorder #ffffff00
editor.foldBackground #3c402b
editor.foreground #c9c5bf
editor.hoverHighlightBackground #825b616a
editor.inactiveSelectionBackground #3e3d3a
editor.lineHighlightBackground #343330
editor.lineHighlightBorder #28282800
editor.rangeHighlightBackground #ffffff0b
editor.rangeHighlightBorder #ffffff00
editor.selectionBackground #3c402b
editor.selectionHighlightBackground #65646112
editor.selectionHighlightBorder #3c402b
editor.wordHighlightBackground #3e3d3a
editor.wordHighlightBorder #656461
editor.wordHighlightStrongBackground #825b616a
editor.wordHighlightStrongBorder #825b61
editorBracketMatch.background #00640000
editorBracketMatch.border #d2d6c5
editorCodeLens.foreground #3e3d3a
editorCursor.background #2a2926
editorCursor.foreground #c9c5bf
editorError.background #B73A3400
editorError.border #ffffff00
editorError.foreground #92543b
editorGroup.border #343330
editorGroup.emptyBackground #2a2926
editorGroupHeader.border #2a2926
editorGroupHeader.tabsBackground #2a2926
editorGroupHeader.tabsBorder #343330
editorGutter.addedBackground #869250
editorGutter.background #2a2926
editorGutter.commentRangeForeground #656461
editorGutter.deletedBackground #92543b
editorGutter.foldingControlForeground #656461
editorGutter.modifiedBackground #b4914f
editorHoverWidget.background #343330
editorHoverWidget.border #3e3d3a
editorHoverWidget.foreground #656461
editorIndentGuide.activeBackground #3e3d3a
editorIndentGuide.background #343330
editorInfo.background #4490BF00
editorInfo.border #4490BF00
editorInfo.foreground #78824d
editorLineNumber.activeForeground #656461
editorLineNumber.foreground #3e3d3a
editorLink.activeForeground #4e76b4
editorMarkerNavigation.background #2d2d30
editorMarkerNavigationError.background #825b61
editorMarkerNavigationInfo.background #a4b55b
editorMarkerNavigationWarning.background #d6971e
editorOverviewRuler.background #a11c1c00
editorOverviewRuler.border #3e3d3a
editorRuler.foreground #343330
editorSuggestWidget.background #343330
editorSuggestWidget.border #3e3d3a
editorSuggestWidget.foreground #656461
editorSuggestWidget.highlightForeground #a4b55b
editorSuggestWidget.selectedBackground #3c402b
editorWarning.background #A9904000
editorWarning.border #ffffff00
editorWarning.foreground #ad8332
editorWhitespace.foreground #656461
editorWidget.background #343330
editorWidget.foreground #656461
editorWidget.resizeBorder #3e3d3a
focusBorder #a4b55b
foreground #d2d6c5
gitDecoration.addedResourceForeground #869250
gitDecoration.conflictingResourceForeground #68689b
gitDecoration.deletedResourceForeground #92543b
gitDecoration.ignoredResourceForeground #656461
gitDecoration.modifiedResourceForeground #b4914f
gitDecoration.stageDeletedResourceForeground #92543b
gitDecoration.stageModifiedResourceForeground #b4914f
gitDecoration.submoduleResourceForeground #6f89a1
gitDecoration.untrackedResourceForeground #c9c5bf
icon.foreground #d2d6c5
input.background #2a2926
input.border #a4b55b
input.foreground #c9c5bf
input.placeholderForeground #656461
inputOption.activeBackground #3c402b
inputOption.activeBorder #a4b55b00
inputOption.activeForeground #c9c5bf
list.activeSelectionBackground #3c402b
list.activeSelectionForeground #c9c5bf
list.dropBackground #3c402b
list.focusBackground #3c402b
list.focusForeground #c9c5bf
list.highlightForeground #a4b55b
list.hoverBackground #3c402b
list.hoverForeground #c9c5bf
list.inactiveSelectionBackground #3e3d3a
list.inactiveSelectionForeground #c9c5bf
listFilterWidget.background #825b61
listFilterWidget.noMatchesOutline #f2cbd1
listFilterWidget.outline #00000000
menu.background #343330
menu.border #3e3d3a00
menu.foreground #c9c5bf
menu.selectionBackground #3c402b
menu.selectionBorder #b23e3e00
menu.selectionForeground #eeeae3
menu.separatorBackground #656461
menubar.selectionBackground #3e3d3a
menubar.selectionBorder #ff545400
menubar.selectionForeground #c9c5bf
merge.commonContentBackground #282828
merge.commonHeaderBackground #383838
merge.currentContentBackground #3c402b
merge.currentHeaderBackground #5e6442
merge.incomingContentBackground #564749
merge.incomingHeaderBackground #825b61
minimap.background #2a2926
minimap.errorHighlight #92543b
minimap.findMatchHighlight #825b6191
minimap.selectionHighlight #3c402b
minimap.warningHighlight #ad8332
minimapGutter.addedBackground #869250
minimapGutter.deletedBackground #92543b
minimapGutter.modifiedBackground #b4914f
notificationCenter.border #3e3d3a
notificationCenterHeader.background #2a2926
notificationCenterHeader.foreground #c9c5bf
notifications.background #343330
notifications.border #3e3d3a
notifications.foreground #c9c5bf
notificationsErrorIcon.foreground #825b61
notificationsInfoIcon.foreground #a4b55b
notificationsWarningIcon.foreground #d6971e
notificationToast.border #3e3d3a
panel.background #343330
panel.border #3e3d3a
panelSection.border #3e3d3a
panelTitle.activeBorder #825b61
panelTitle.activeForeground #c9c5bf
panelTitle.inactiveForeground #656461
peekView.border #825b61
peekViewEditor.background #343330
peekViewEditor.matchHighlightBackground #825b61
peekViewEditor.matchHighlightBorder #f2cbd1
peekViewEditorGutter.background #2a2926
peekViewResult.background #2a2926
peekViewResult.fileForeground #c9c5bf
peekViewResult.lineForeground #c9c5bf
peekViewResult.matchHighlightBackground #825b61
peekViewResult.selectionBackground #3c402b
peekViewResult.selectionForeground #c9c5bf
peekViewTitle.background #2a2926
peekViewTitleDescription.foreground #656461
peekViewTitleLabel.foreground #c9c5bf
pickerGroup.border #3e3d3a
pickerGroup.foreground #a4b55b
progressBar.background #f8c666
scrollbar.shadow #151413
scrollbarSlider.activeBackground #bfbfbf66
scrollbarSlider.background #79797966
scrollbarSlider.hoverBackground #646464b3
selection.background #3c402b
settings.focusedRowBackground #ffffff07
settings.headerForeground #d2d6c5
sideBar.background #2a2926
sideBar.border #343330
sideBar.dropBackground #3c402b
sideBar.foreground #656461
sideBarSectionHeader.background #86404000
sideBarSectionHeader.border #656461
sideBarSectionHeader.foreground #656461
sideBarTitle.foreground #656461
statusBar.background #825b61
statusBar.debuggingBackground #d6971e
statusBar.debuggingForeground #2a2926
statusBar.foreground #eeeae3
statusBar.noFolderBackground #a4b55b
statusBar.noFolderForeground #2a2926
statusBarItem.activeBackground #FFFFFF25
statusBarItem.hoverBackground #ffffff24
statusBarItem.remoteBackground #3e3d3a
statusBarItem.remoteForeground #c9c5bf
tab.activeBackground #343330
tab.activeBorder #00000000
tab.activeBorderTop #00000000
tab.activeForeground #c9c5bf
tab.border #3e3d3a
tab.inactiveBackground #2a2926
tab.inactiveForeground #656461
terminal.ansiBlack #656461
terminal.ansiBlue #4e76b4
terminal.ansiBrightBlack #656461
terminal.ansiBrightBlue #6283e8
terminal.ansiBrightCyan #6db8d7
terminal.ansiBrightGreen #c4e456
terminal.ansiBrightMagenta #b38cff
terminal.ansiBrightRed #cf5f31
terminal.ansiBrightWhite #f7f5f1
terminal.ansiBrightYellow #f8c666
terminal.ansiCyan #5197a7
terminal.ansiGreen #a4b55b
terminal.ansiMagenta #9d6dec
terminal.ansiRed #bc6f4f
terminal.ansiWhite #eeeae3
terminal.ansiYellow #d6971e
terminal.border #3e3d3a
terminal.foreground #c9c5bf
terminal.selectionBackground #3c402b76
terminalCursor.background #2a2926
terminalCursor.foreground #c9c5bf
textLink.foreground #a97a81
titleBar.activeBackground #343330
titleBar.activeForeground #c9c5bf
titleBar.border #920e0e00
titleBar.inactiveBackground #3e3d3a
titleBar.inactiveForeground #656461
tree.indentGuidesStroke #343330
walkThrough.embeddedEditorBackground #00000050
widget.shadow #0000005c #eeeae3
punctuation.separator.period.python,punctuation.separator.element.python,punctuation.parenthesis.begin.python,punctuation.parenthesis.end.python #ab989b —
variable.parameter.function.language.special.self.python #c9c5bf —
storage.modifier.lifetime.rust #ab989b —
support.function.std.rust #d6971e —
entity.name.lifetime.rust #c9c5bf —
variable.language.rust #eeeae3 —
support.constant.edge #ab989b —
constant.other.character-class.regexp #eeeae3 —
keyword.operator.quantifier.regexp #f8c666 —
punctuation.definition.string.begin,punctuation.definition.string.end #a4b55b —
variable.parameter.function #ab989b —
comment markup.link #656461 —
markup.changed.diff #c9c5bf —
meta.diff.header.from-file,meta.diff.header.to-file,punctuation.definition.from-file.diff,punctuation.definition.to-file.diff #d6971e —
markup.inserted.diff #a4b55b —
markup.deleted.diff #eeeae3 —
meta.function.c,meta.function.cpp #eeeae3 —
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 #ab989b —
punctuation.separator.key-value #ab989b —
keyword.operator.expression.import #d6971e —
support.constant.math #c9c5bf —
support.constant.property.math #f8c666 —
variable.other.constant #c9c5bf —
storage.type.annotation.java, storage.type.object.array.java #c9c5bf —
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 #ab989b —
storage.modifier.import.java,storage.type.java,storage.type.generic.java #c9c5bf —
keyword.operator.instanceof.java #ab989b —
meta.definition.variable.name.java #eeeae3 —
keyword.operator.logical #9d7b80 —
keyword.operator.bitwise #9d7b80 —
keyword.operator.channel #9d7b80 —
support.constant.property-value.scss,support.constant.property-value.css #f8c666 —
keyword.operator.css,keyword.operator.scss,keyword.operator.less #9d7b80 —
support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss #f8c666 —
punctuation.separator.list.comma.css #ab989b —
support.constant.color.w3c-standard-color-name.css #f8c666 —
support.type.vendored.property-name.css #9d7b80 —
support.module.node,support.type.object.module,support.module.node #c9c5bf —
entity.name.type.module #c9c5bf —
variable.other.readwrite,meta.object-literal.key,support.variable.property,support.variable.object.process,support.variable.object.node #eeeae3 —
support.constant.json #f8c666 —
keyword.operator.expression.instanceof, keyword.operator.new, keyword.operator.ternary, keyword.operator.optional, keyword.operator.expression.keyof #ab989b —
support.type.object.console #eeeae3 —
support.variable.property.process #f8c666 —
entity.name.function,support.function.console #d6971e —
keyword.operator.misc.rust #ab989b —
keyword.operator.sigil.rust #ab989b —
keyword.operator.delete #ab989b —
support.type.object.dom #9d7b80 —
support.variable.dom,support.variable.property.dom #eeeae3 —
keyword.operator.arithmetic,keyword.operator.comparison,keyword.operator.decrement,keyword.operator.increment,keyword.operator.relational #9d7b80 —
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 #ab989b —
punctuation.separator.delimiter #ab989b —
punctuation.separator.c,punctuation.separator.cpp #ab989b —
support.type.posix-reserved.c,support.type.posix-reserved.cpp #9d7b80 —
keyword.operator.sizeof.c,keyword.operator.sizeof.cpp #ab989b —
variable.parameter.function.language.python #f8c666 —
support.type.python #9d7b80 —
keyword.operator.logical.python #ab989b —
variable.parameter.function.python #f8c666 —
punctuation.definition.arguments.begin.python,punctuation.definition.arguments.end.python,punctuation.separator.arguments.python,punctuation.definition.list.begin.python,punctuation.definition.list.end.python #ab989b —
meta.function-call.generic.python #d6971e —
constant.character.format.placeholder.other.python #f8c666 —
keyword.operator.assignment.compound #ab989b —
keyword.operator.assignment.compound.js,keyword.operator.assignment.compound.ts #9d7b80 —
entity.name.namespace #c9c5bf —
variable.language #c9c5bf —
token.variable.parameter.java #ab989b —
import.storage.java #c9c5bf —
token.package.keyword #ab989b —
entity.name.function, meta.require, support.function.any-method, variable.function #d6971e —
entity.name.type.namespace #c9c5bf —
support.class, entity.name.type.class #c9c5bf —
entity.name.class.identifier.namespace.type #c9c5bf —
entity.name.class, variable.other.class.js, variable.other.class.ts #c9c5bf —
variable.other.class.php #eeeae3 —
control.elements, keyword.operator.less #f8c666 —
keyword.other.special-method #d6971e —
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 #ab989b —
token.storage.type.java #c9c5bf —
support.type.property-name #ab989b —
support.constant.property-value #ab989b —
support.constant.font-name #f8c666 —
entity.other.inherited-class #c9c5bf —
constant.other.symbol #9d7b80 —
punctuation.definition.constant #f8c666 —
entity.other.attribute-name #f8c666 —
entity.other.attribute-name.id #d6971e normal
entity.other.attribute-name.class.css #f8c666 normal
markup.heading punctuation.definition.heading, entity.name.section #d6971e —
keyword.other.unit #eeeae3 —
markup.bold,todo.bold #f8c666 —
punctuation.definition.bold #c9c5bf —
markup.italic, punctuation.definition.italic,todo.emphasis #ab989b —
entity.name.section.markdown #eeeae3 —
punctuation.definition.heading.markdown #eeeae3 —
punctuation.definition.list.begin.markdown #eeeae3 —
markup.heading.setext #ab989b —
punctuation.definition.bold.markdown #f8c666 —
markup.inline.raw.markdown #a4b55b —
markup.inline.raw.string.markdown #a4b55b —
punctuation.definition.list.markdown #eeeae3 —
punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown #eeeae3 —
beginning.punctuation.definition.list.markdown #eeeae3 —
punctuation.definition.metadata.markdown #eeeae3 —
markup.underline.link.markdown,markup.underline.link.image.markdown #ab989b —
string.other.link.title.markdown,string.other.link.description.markdown #d6971e —
constant.character.escape #9d7b80 —
punctuation.section.embedded, variable.interpolation #eeeae3 —
punctuation.section.embedded.begin,punctuation.section.embedded.end #ab989b —
invalid.illegal.bad-ampersand.html #ab989b —
invalid.deprecated #ffffff —
invalid.unimplemented #ffffff —
source.json meta.structure.dictionary.json > string.quoted.json #eeeae3 —
source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string #eeeae3 —
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 #a4b55b —
source.json meta.structure.dictionary.json > constant.language.json,source.json meta.structure.array.json > constant.language.json #9d7b80 —
support.type.property-name.json #eeeae3 —
support.type.property-name.json punctuation #eeeae3 —
text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade #ab989b —
text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade #ab989b —
support.other.namespace.use.php,support.other.namespace.use-as.php,support.other.namespace.php,entity.other.alias.php,meta.interface.php #c9c5bf —
keyword.operator.error-control.php #ab989b —
keyword.operator.type.php #ab989b —
punctuation.section.array.begin.php #ab989b —
punctuation.section.array.end.php #ab989b —
invalid.illegal.non-null-typehinted.php #f44747 —
storage.type.php,meta.other.type.phpdoc.php,keyword.other.type.php,keyword.other.array.phpdoc.php #c9c5bf —
meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php #d6971e —
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 #ab989b —
support.constant.core.rust #f8c666 —
support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php #f8c666 —
entity.name.goto-label.php,support.other.php #d6971e —
keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php #9d7b80 —
keyword.operator.regexp.php #ab989b —
keyword.operator.comparison.php #9d7b80 —
keyword.operator.heredoc.php,keyword.operator.nowdoc.php #ab989b —
meta.function.decorator.python #d6971e —
support.token.decorator.python,meta.function.decorator.identifier.python #9d7b80 —
function.parameter #ab989b —
function.parameter.ruby, function.parameter.cs #ab989b —
constant.language.symbol.ruby #9d7b80 —
inline-color-decoration rgb-value #f8c666 —
support.type.primitive.ts,support.type.builtin.ts,support.type.primitive.tsx,support.type.builtin.tsx #c9c5bf —
block.scope.end,block.scope.begin #ab989b —
entity.name.variable.local.cs #eeeae3 —
token.error-token #f44747 —
token.debug-token #ab989b —
punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded #ab989b —
meta.template.expression #ab989b —
keyword.operator.module #ab989b —
support.type.type.flowtype #d6971e —
support.type.primitive #c9c5bf —
meta.property.object #eeeae3 —
variable.parameter.function.js #eeeae3 —
keyword.other.template.begin #a4b55b —
keyword.other.template.end #a4b55b —
keyword.other.substitution.begin #a4b55b —
keyword.other.substitution.end #a4b55b —
keyword.operator.assignment #9d7b80 —
keyword.operator.assignment.go #c9c5bf —
keyword.operator.arithmetic.go, keyword.operator.address.go #ab989b —
entity.name.package.go #c9c5bf —
support.type.prelude.elm #9d7b80 —
support.constant.elm #f8c666 —
punctuation.quasi.element #ab989b —
constant.character.entity #eeeae3 —
entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class #9d7b80 —
entity.global.clojure #c9c5bf —
meta.symbol.clojure #eeeae3 —
constant.keyword.clojure #9d7b80 —
meta.arguments.coffee, variable.parameter.function.coffee #eeeae3 —
meta.scope.prerequisites.makefile #eeeae3 —
storage.modifier.import.groovy #c9c5bf —
meta.method.groovy #d6971e —
meta.definition.variable.name.groovy #eeeae3 —
meta.definition.class.inherited.classes.groovy #a4b55b —
support.variable.semantic.hlsl #c9c5bf —
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 #ab989b —
text.variable, text.bracketed #eeeae3 —
support.type.swift, support.type.vb.asp #c9c5bf —
entity.name.function.xi #c9c5bf —
entity.name.class.xi #9d7b80 —
constant.character.character-class.regexp.xi #eeeae3 —
constant.regexp.xi #ab989b —
keyword.control.xi #9d7b80 —
beginning.punctuation.definition.quote.markdown.xi #a4b55b —
beginning.punctuation.definition.list.markdown.xi #656461 —
constant.character.xi #d6971e —
constant.other.color.rgb-value.xi #ffffff —
punctuation.definition.tag.xi #656461 —
entity.name.label.cs, entity.name.scope-resolution.function.call, entity.name.scope-resolution.function.definition #c9c5bf —
entity.name.label.cs, markup.heading.setext.1.markdown, markup.heading.setext.2.markdown #eeeae3 —
meta.brace.square #ab989b —
comment, punctuation.definition.comment #656461 italic
markup.quote.markdown #656461 —
punctuation.definition.block.sequence.item.yaml #ab989b —
constant.language.symbol.elixir #9d7b80 —
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...
~/my-project
main*
Button.tsx
31
$
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 } !` ;
}