Skip to main content
Home Theme VS Code Mineshaft A dark theme to bring focus on your code and not the IDE
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.background #333333 activityBar.border #666666 activityBar.foreground #f8f9fa activityBar.inactiveForeground #9b9b9b activityBarBadge.background #111111 activityBarBadge.foreground #f8f9fa 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 #d4d4d4 — variable.other.generic-type.haskell #e65f5f — storage.type.haskell #77e460 — support.variable.magic.python
Shiki preview TypeScript sample highlighted with this variant's colors and tokenColors.
badge.background
#4d4d4d
badge.foreground #ffffff
breadcrumb.activeSelectionForeground #e0e0e0
breadcrumb.background #1e1e1e
breadcrumb.focusForeground #e0e0e0
breadcrumb.foreground #cccccccc
button.background #3e413e
button.foreground #f8f9fa
button.hoverBackground #626262
button.secondaryBackground #4c4a4f
button.secondaryForeground #f8f9fa
button.secondaryHoverBackground #626262
checkbox.background #3c3c3c
checkbox.border #00000000
checkbox.foreground #cccccc
debugExceptionWidget.background #333333
debugExceptionWidget.border #474747
debugToolBar.background #333333
debugToolBar.border #474747
diffEditor.border #444444
diffEditor.insertedTextBackground #9bb95533
diffEditor.removedTextBackground #ff000033
dropdown.background #3c3c3c
dropdown.border #00000000
dropdown.foreground #cccccc
editor.background #1e1e1e
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 #3a3d41
editor.lineHighlightBackground #ffffff0A
editor.lineHighlightBorder #282828
editor.rangeHighlightBackground #ffffff0b
editor.rangeHighlightBorder #ffffff00
editor.selectionBackground #c09e1e38
editor.selectionHighlightBackground #add6ff26
editor.selectionHighlightBorder #495F77
editor.wordHighlightBackground #575757b8
editor.wordHighlightStrongBackground #004972b8
editorBracketMatch.background #0064001a
editorBracketMatch.border #888888
editorCodeLens.foreground #999999
editorCursor.background #000000
editorCursor.foreground #aeafad
editorError.background #B73A3400
editorError.border #ffffff00
editorError.foreground #f48771
editorGroup.border #444444
editorGroup.emptyBackground #1e1e1e
editorGroupHeader.tabsBackground #313131
editorGutter.addedBackground #587c0c
editorGutter.background #1e1e1e
editorGutter.commentRangeForeground #c5c5c5
editorGutter.deletedBackground #94151b
editorGutter.foldingControlForeground #c5c5c5
editorGutter.modifiedBackground #0c7d9d
editorHoverWidget.background #252526
editorHoverWidget.border #454545
editorHoverWidget.foreground #cccccc
editorIndentGuide.activeBackground #707070
editorIndentGuide.background #404040
editorInfo.background #4490BF00
editorInfo.border #4490BF00
editorInfo.foreground #75beff
editorLineNumber.activeForeground #c6c6c6
editorLineNumber.foreground #858585
editorLink.activeForeground #4e94ce
editorMarkerNavigation.background #2d2d30
editorMarkerNavigationError.background #f48771
editorMarkerNavigationInfo.background #75beff
editorMarkerNavigationWarning.background #cca700
editorOverviewRuler.background #25252500
editorOverviewRuler.border #7f7f7f4d
editorRuler.foreground #5a5a5a
editorSuggestWidget.background #252526
editorSuggestWidget.border #454545
editorSuggestWidget.foreground #d4d4d4
editorSuggestWidget.highlightForeground #0097fb
editorSuggestWidget.selectedBackground #062f4a
editorWarning.background #A9904000
editorWarning.border #ffffff00
editorWarning.foreground #cca700
editorWhitespace.foreground #e3e4e229
editorWidget.background #252526
editorWidget.foreground #cccccc
editorWidget.resizeBorder #5F5F5F
focusBorder #1c7509
foreground #616161
gitDecoration.addedResourceForeground #31c312
gitDecoration.conflictingResourceForeground #b4117b
gitDecoration.deletedResourceForeground #e21528
gitDecoration.ignoredResourceForeground #616161
gitDecoration.modifiedResourceForeground #eaa215
gitDecoration.stageDeletedResourceForeground #e21528
gitDecoration.stageModifiedResourceForeground #eaa215
gitDecoration.submoduleResourceForeground #8db9e2
gitDecoration.untrackedResourceForeground #f8f9fa
icon.foreground #616161
input.background #3c3c3c
input.border #00000000
input.foreground #cccccc
input.placeholderForeground #a6a6a6
inputOption.activeBackground #905f007c
inputOption.activeBorder #007acc00
inputOption.activeForeground #ffffff
list.activeSelectionBackground #4d4d4d
list.activeSelectionForeground #ffffff
list.dropBackground #383b3d
list.focusBackground #313131
list.focusForeground #cccccc
list.highlightForeground #905f00
list.hoverBackground #2a2d2e
list.hoverForeground #cccccc
list.inactiveSelectionBackground #37373d
list.inactiveSelectionForeground #cccccc
listFilterWidget.background #905f00
listFilterWidget.noMatchesOutline #e21528
listFilterWidget.outline #00000000
menu.background #252526
menu.border #00000085
menu.foreground #cccccc
menu.selectionBackground #616161
menu.selectionBorder #00000000
menu.selectionForeground #ffffff
menu.separatorBackground #bbbbbb
menubar.selectionBackground #ffffff1a
menubar.selectionForeground #cccccc
merge.commonContentBackground #282828
merge.commonHeaderBackground #383838
merge.currentContentBackground #27403B
merge.currentHeaderBackground #367366
merge.incomingContentBackground #28384B
merge.incomingHeaderBackground #395F8F
minimap.background #1e1e1e
minimap.errorHighlight #f48771
minimap.findMatchHighlight #515c6a
minimap.selectionHighlight #c09e1e38
minimap.warningHighlight #cca700
minimapGutter.addedBackground #587c0c
minimapGutter.deletedBackground #94151b
minimapGutter.modifiedBackground #0c7d9d
notificationCenter.border #474747
notificationCenterHeader.background #303031
notificationCenterHeader.foreground #cccccc
notifications.background #252526
notifications.border #303031
notifications.foreground #cccccc
notificationsErrorIcon.foreground #e21528
notificationsInfoIcon.foreground #75beff
notificationsWarningIcon.foreground #eaa215
notificationToast.border #474747
panel.background #1e1e1e
panel.border #80808059
panelSection.border #80808059
panelTitle.activeBorder #e7e7e7
panelTitle.activeForeground #e7e7e7
panelTitle.inactiveForeground #e7e7e799
peekView.border #007acc
peekViewEditor.background #001f33
peekViewEditor.matchHighlightBackground #ff8f0099
peekViewEditor.matchHighlightBorder #ee931e
peekViewEditorGutter.background #001f33
peekViewResult.background #252526
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 #3f3f46
pickerGroup.foreground #f5f5f5
progressBar.background #298a14
scrollbar.shadow #000000
scrollbarSlider.activeBackground #bfbfbf66
scrollbarSlider.background #79797966
scrollbarSlider.hoverBackground #646464b3
selection.background #c9b97e5a
settings.focusedRowBackground #ffffff07
settings.headerForeground #616161
sideBar.background #252526
sideBar.dropBackground #383b3d
sideBar.foreground #cccccc
sideBarSectionHeader.background #00000000
sideBarSectionHeader.border #cccccc33
sideBarSectionHeader.foreground #cccccc
sideBarTitle.foreground #bbbbbb
statusBar.background #313131
statusBar.debuggingBackground #905f00
statusBar.debuggingForeground #f8f9fa
statusBar.foreground #f8f9fa
statusBar.noFolderBackground #111111
statusBar.noFolderForeground #f8f9fa
statusBarItem.activeBackground #FFFFFF25
statusBarItem.hoverBackground #ffffff1f
statusBarItem.remoteBackground #157800
statusBarItem.remoteForeground #f8f9fa
tab.activeBackground #1e1e1e
tab.activeBorder #31c3128f
tab.activeBorderTop #00000000
tab.activeForeground #ffffff
tab.border #252526
tab.inactiveBackground #313131
tab.inactiveForeground #ffffff80
terminal.ansiBlack #000000
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 #ffffff40
terminalCursor.background #0087FF
terminalCursor.foreground #ffffff
textLink.foreground #31c312
titleBar.activeBackground #3c3c3c
titleBar.activeForeground #cccccc
titleBar.border #00000000
titleBar.inactiveBackground #3c3c3c99
titleBar.inactiveForeground #cccccc99
tree.indentGuidesStroke #585858
walkThrough.embeddedEditorBackground #00000050
widget.shadow #0000005c #d4d4d4
punctuation.separator.period.python,punctuation.separator.element.python,punctuation.parenthesis.begin.python,punctuation.parenthesis.end.python #d4d4d4 —
variable.parameter.function.language.special.self.python #e0a43d —
storage.modifier.lifetime.rust #d4d4d4 —
support.function.std.rust #e0a43d —
entity.name.lifetime.rust #e0a43d —
variable.language.rust #d4d4d4 —
support.constant.edge #e65f5f —
constant.other.character-class.regexp #d4d4d4 —
keyword.operator.quantifier.regexp #77e460 —
punctuation.definition.string.begin,punctuation.definition.string.end #76db61 —
variable.parameter.function #d4d4d4 —
comment markup.link #656a73 —
markup.changed.diff #e0a43d —
meta.diff.header.from-file,meta.diff.header.to-file,punctuation.definition.from-file.diff,punctuation.definition.to-file.diff #e0a43d —
markup.inserted.diff #76db61 —
markup.deleted.diff #d4d4d4 —
meta.function.c,meta.function.cpp #d4d4d4 —
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 #e0a43d —
support.constant.math #e0a43d —
support.constant.property.math #77e460 —
variable.other.constant #e0a43d —
storage.type.annotation.java, storage.type.object.array.java #e0a43d —
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 #e0a43d —
keyword.operator.instanceof.java #e65f5f —
meta.definition.variable.name.java #d4d4d4 —
keyword.operator.logical #e65f5f —
keyword.operator.bitwise #e65f5f —
keyword.operator.channel #e65f5f —
support.constant.property-value.scss,support.constant.property-value.css #77e460 —
keyword.operator.css,keyword.operator.scss,keyword.operator.less #e65f5f —
support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss #77e460 —
punctuation.separator.list.comma.css #d4d4d4 —
support.constant.color.w3c-standard-color-name.css #77e460 —
support.type.vendored.property-name.css #e65f5f —
support.module.node,support.type.object.module,support.module.node #e0a43d —
entity.name.type.module #e0a43d —
variable.other.readwrite,meta.object-literal.key,support.variable.property,support.variable.object.process,support.variable.object.node #d4d4d4 —
support.constant.json #77e460 —
keyword.operator.expression.instanceof, keyword.operator.new, keyword.operator.ternary, keyword.operator.optional, keyword.operator.expression.keyof #e65f5f —
support.type.object.console #d4d4d4 —
support.variable.property.process #77e460 —
entity.name.function,support.function.console #e0a43d —
keyword.operator.misc.rust #d4d4d4 —
keyword.operator.sigil.rust #e65f5f —
keyword.operator.delete #e65f5f —
support.type.object.dom #e65f5f —
support.variable.dom,support.variable.property.dom #d4d4d4 —
keyword.operator.arithmetic,keyword.operator.comparison,keyword.operator.decrement,keyword.operator.increment,keyword.operator.relational #e65f5f —
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 #e65f5f —
punctuation.separator.delimiter #d4d4d4 —
punctuation.separator.c,punctuation.separator.cpp #e65f5f —
support.type.posix-reserved.c,support.type.posix-reserved.cpp #e65f5f —
keyword.operator.sizeof.c,keyword.operator.sizeof.cpp #e65f5f —
variable.parameter.function.language.python #77e460 —
support.type.python #e65f5f —
keyword.operator.logical.python #e65f5f —
variable.parameter.function.python #77e460 —
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 #e0a43d —
constant.character.format.placeholder.other.python #77e460 —
keyword.operator.assignment.compound #e65f5f —
keyword.operator.assignment.compound.js,keyword.operator.assignment.compound.ts #e65f5f —
entity.name.namespace #e0a43d —
variable.language #e0a43d —
token.variable.parameter.java #d4d4d4 —
import.storage.java #e0a43d —
token.package.keyword #e65f5f —
entity.name.function, meta.require, support.function.any-method, variable.function #e0a43d —
entity.name.type.namespace #e0a43d —
support.class, entity.name.type.class #e0a43d —
entity.name.class.identifier.namespace.type #e0a43d —
entity.name.class, variable.other.class.js, variable.other.class.ts #e0a43d —
variable.other.class.php #d4d4d4 —
control.elements, keyword.operator.less #77e460 —
keyword.other.special-method #e0a43d —
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 #e65f5f —
token.storage.type.java #e0a43d —
support.type.property-name #d4d4d4 —
support.constant.property-value #d4d4d4 —
support.constant.font-name #77e460 —
entity.other.inherited-class #e0a43d —
constant.other.symbol #e65f5f —
punctuation.definition.constant #77e460 —
entity.other.attribute-name #77e460 —
entity.other.attribute-name.id #e0a43d normal
entity.other.attribute-name.class.css #77e460 normal
markup.heading punctuation.definition.heading, entity.name.section #e0a43d —
keyword.other.unit #d4d4d4 —
markup.bold,todo.bold #77e460 —
punctuation.definition.bold #e0a43d —
markup.italic, punctuation.definition.italic,todo.emphasis #e65f5f —
entity.name.section.markdown #d4d4d4 —
punctuation.definition.heading.markdown #d4d4d4 —
punctuation.definition.list.begin.markdown #d4d4d4 —
markup.heading.setext #d4d4d4 —
punctuation.definition.bold.markdown #77e460 —
markup.inline.raw.markdown #76db61 —
markup.inline.raw.string.markdown #76db61 —
punctuation.definition.list.markdown #d4d4d4 —
punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown #d4d4d4 —
beginning.punctuation.definition.list.markdown #d4d4d4 —
punctuation.definition.metadata.markdown #d4d4d4 —
markup.underline.link.markdown,markup.underline.link.image.markdown #e65f5f —
string.other.link.title.markdown,string.other.link.description.markdown #e0a43d —
constant.character.escape #e65f5f —
punctuation.section.embedded, variable.interpolation #d4d4d4 —
punctuation.section.embedded.begin,punctuation.section.embedded.end #e65f5f —
invalid.illegal.bad-ampersand.html #d4d4d4 —
invalid.deprecated #ffffff —
invalid.unimplemented #ffffff —
source.json meta.structure.dictionary.json > string.quoted.json #d4d4d4 —
source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string #d4d4d4 —
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 #76db61 —
source.json meta.structure.dictionary.json > constant.language.json,source.json meta.structure.array.json > constant.language.json #e65f5f —
support.type.property-name.json #d4d4d4 —
support.type.property-name.json punctuation #d4d4d4 —
text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade #e65f5f —
text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade #e65f5f —
support.other.namespace.use.php,support.other.namespace.use-as.php,support.other.namespace.php,entity.other.alias.php,meta.interface.php #e0a43d —
keyword.operator.error-control.php #e65f5f —
keyword.operator.type.php #e65f5f —
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 #e0a43d —
meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php #e0a43d —
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 #77e460 —
support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php #77e460 —
entity.name.goto-label.php,support.other.php #e0a43d —
keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php #e65f5f —
keyword.operator.regexp.php #e65f5f —
keyword.operator.comparison.php #e65f5f —
keyword.operator.heredoc.php,keyword.operator.nowdoc.php #e65f5f —
meta.function.decorator.python #e0a43d —
support.token.decorator.python,meta.function.decorator.identifier.python #e65f5f —
function.parameter #d4d4d4 —
function.parameter.ruby, function.parameter.cs #d4d4d4 —
constant.language.symbol.ruby #e65f5f —
inline-color-decoration rgb-value #77e460 —
support.type.primitive.ts,support.type.builtin.ts,support.type.primitive.tsx,support.type.builtin.tsx #e0a43d —
block.scope.end,block.scope.begin #d4d4d4 —
entity.name.variable.local.cs #d4d4d4 —
token.error-token #f44747 —
token.debug-token #e65f5f —
punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded #e65f5f —
meta.template.expression #d4d4d4 —
keyword.operator.module #e65f5f —
support.type.type.flowtype #e0a43d —
support.type.primitive #e0a43d —
meta.property.object #d4d4d4 —
variable.parameter.function.js #d4d4d4 —
keyword.other.template.begin #76db61 —
keyword.other.template.end #76db61 —
keyword.other.substitution.begin #76db61 —
keyword.other.substitution.end #76db61 —
keyword.operator.assignment #e65f5f —
keyword.operator.assignment.go #e0a43d —
keyword.operator.arithmetic.go, keyword.operator.address.go #e65f5f —
entity.name.package.go #e0a43d —
support.type.prelude.elm #e65f5f —
support.constant.elm #77e460 —
punctuation.quasi.element #e65f5f —
constant.character.entity #d4d4d4 —
entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class #e65f5f —
entity.global.clojure #e0a43d —
meta.symbol.clojure #d4d4d4 —
constant.keyword.clojure #e65f5f —
meta.arguments.coffee, variable.parameter.function.coffee #d4d4d4 —
meta.scope.prerequisites.makefile #d4d4d4 —
storage.modifier.import.groovy #e0a43d —
meta.method.groovy #e0a43d —
meta.definition.variable.name.groovy #d4d4d4 —
meta.definition.class.inherited.classes.groovy #76db61 —
support.variable.semantic.hlsl #e0a43d —
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 #e65f5f —
text.variable, text.bracketed #d4d4d4 —
support.type.swift, support.type.vb.asp #e0a43d —
entity.name.function.xi #e0a43d —
entity.name.class.xi #e65f5f —
constant.character.character-class.regexp.xi #d4d4d4 —
constant.regexp.xi #e65f5f —
keyword.control.xi #e65f5f —
beginning.punctuation.definition.quote.markdown.xi #76db61 —
beginning.punctuation.definition.list.markdown.xi #656a73 —
constant.character.xi #e0a43d —
constant.other.color.rgb-value.xi #ffffff —
punctuation.definition.tag.xi #656a73 —
entity.name.label.cs, entity.name.scope-resolution.function.call, entity.name.scope-resolution.function.definition #e0a43d —
entity.name.label.cs, markup.heading.setext.1.markdown, markup.heading.setext.2.markdown #d4d4d4 —
meta.brace.square #d4d4d4 —
comment, punctuation.definition.comment #656a73 italic
markup.quote.markdown #656a73 —
punctuation.definition.block.sequence.item.yaml #d4d4d4 —
constant.language.symbol.elixir #e65f5f —
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*
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 } !` ;
}
Mineshaft | Coding Theme