Skip to main content
Home Theme VS Code Darkroom Darkroom Theme: Rich Colors, Dark Ambiance, No Eye Strain
Darkroom | 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 #3c3f6438 activityBar.background #161928 activityBar.border #000000 activityBar.foreground #fff000 activityBar.inactiveForeground #b5b5e066 activityBarBadge.background #007acc 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 #e87676 — variable.other.generic-type.haskell #c573de — storage.type.haskell #00e2b7 — support.variable.magic.python
Shiki preview TypeScript sample highlighted with this variant's colors and tokenColors.
activityBarBadge.foreground #f7f7f7
badge.background #cd4545
badge.foreground #ffffff
breadcrumb.activeSelectionForeground #fffb00
breadcrumb.background #212434
breadcrumb.focusForeground #fffb00
breadcrumb.foreground #8899a3
button.background #2a6099
button.foreground #fdfdfd
button.hoverBackground #1173b4
button.secondaryBackground #3a3d41
button.secondaryForeground #ffffff
button.secondaryHoverBackground #45494e
checkbox.background #262441
checkbox.border #2e2e2e00
checkbox.foreground #fbdf00
debugExceptionWidget.background #12182e
debugExceptionWidget.border #494949ab
debugToolBar.background #12182e
debugToolBar.border #494949ab
diffEditor.border #00000000
diffEditor.insertedTextBackground #667b4033
diffEditor.insertedTextBorder #41401edb
diffEditor.removedTextBackground #602e2e33
diffEditor.removedTextBorder #4d22228b
dropdown.background #262441
dropdown.border #2e2e2e00
dropdown.foreground #fbdf00
editor.background #121421
editor.findMatchBackground #a5a5a550
editor.findMatchBorder #5454546c
editor.findMatchHighlightBackground #8686864e
editor.findMatchHighlightBorder #ffffff12
editor.findRangeHighlightBackground #1d214566
editor.findRangeHighlightBorder #f2f2f200
editor.foldBackground #222a494d
editor.foreground #07cfbc
editor.hoverHighlightBackground #5ea79d40
editor.inactiveSelectionBackground #342c3f
editor.lineHighlightBackground #161e493e
editor.lineHighlightBorder #28282800
editor.rangeHighlightBackground #3e487b4e
editor.rangeHighlightBorder #ffffff00
editor.selectionBackground #1d1e5c
editor.selectionHighlightBackground #e8bb942c
editor.selectionHighlightBorder #434343
editor.wordHighlightBackground #575757b8
editor.wordHighlightBorder #ff000000
editor.wordHighlightStrongBackground #085858b8
editor.wordHighlightStrongBorder #ff000000
editorBracketMatch.background #ffde2b00
editorBracketMatch.border #16cda2
editorCodeLens.foreground #4e967fd3
editorCursor.background #000000
editorCursor.foreground #d6f504
editorError.background #7b444200
editorError.border #ffffff00
editorError.foreground #07a7a7
editorGroup.border #00000000
editorGroup.emptyBackground #121421
editorGroupHeader.border #1d1d21
editorGroupHeader.tabsBackground #2a2c3b
editorGroupHeader.tabsBorder #ff787800
editorGutter.addedBackground #509d1b
editorGutter.background #1d202ea1
editorGutter.commentRangeForeground #15bdcf
editorGutter.deletedBackground #ad1b21
editorGutter.foldingControlForeground #15bdcf
editorGutter.modifiedBackground #186d96
editorHoverWidget.background #232636
editorHoverWidget.border #323232
editorHoverWidget.foreground #8a8a8a
editorIndentGuide.activeBackground #4dab45
editorIndentGuide.background #1a6f53
editorInfo.background #4490BF00
editorInfo.border #4490BF00
editorInfo.foreground #5a94c9
editorLineNumber.activeForeground #00ffc6
editorLineNumber.foreground #1c805a
editorLink.activeForeground #7f76f2
editorMarkerNavigation.background #16161d
editorMarkerNavigationError.background #4d1d1d
editorMarkerNavigationInfo.background #20486b
editorMarkerNavigationWarning.background #8c7300
editorOverviewRuler.background #03011f00
editorOverviewRuler.border #1f454500
editorRuler.foreground #31346056
editorSuggestWidget.background #222534
editorSuggestWidget.border #5a5a5a44
editorSuggestWidget.foreground #3f6b69
editorSuggestWidget.highlightForeground #00d3c9
editorSuggestWidget.selectedBackground #12122885
editorWarning.background #A9904000
editorWarning.border #ffffff00
editorWarning.foreground #dbd945
editorWhitespace.foreground #e8e8e829
editorWidget.background #181a28
editorWidget.foreground #555684
editorWidget.resizeBorder #38ab9b
focusBorder #00000000
foreground #54ffa7dd
gitDecoration.addedResourceForeground #74d185
gitDecoration.conflictingResourceForeground #6c6cc4
gitDecoration.deletedResourceForeground #d1533d
gitDecoration.ignoredResourceForeground #a9a9a9
gitDecoration.modifiedResourceForeground #e2c08d
gitDecoration.stageDeletedResourceForeground #c93015
gitDecoration.stageModifiedResourceForeground #e4a84d
gitDecoration.submoduleResourceForeground #8db9e2
gitDecoration.untrackedResourceForeground #3acfba
icon.foreground #54ffa7dd
input.background #262441
input.border #2e2e2e00
input.foreground #fbdf00
input.placeholderForeground #85809d
inputOption.activeBackground #3a3e60
inputOption.activeBorder #00000000
inputOption.activeForeground #50dae8
list.activeSelectionBackground #2c2c43cb
list.activeSelectionForeground #00fff3
list.dropBackground #2c2c43cb
list.focusBackground #2c2c43cb
list.focusForeground #deda0b
list.highlightForeground #16d395
list.hoverBackground #2c2c43cb
list.hoverForeground #ffe300
list.inactiveSelectionBackground #27273b
list.inactiveSelectionForeground #ffd700
listFilterWidget.background #424b60
listFilterWidget.noMatchesOutline #ec574800
listFilterWidget.outline #c2c2c200
menu.background #202230
menu.border #0000000c
menu.foreground #8d9dbc
menu.selectionBackground #2d2c47
menu.selectionBorder #00000000
menu.selectionForeground #ffd700
menu.separatorBackground #45586854
menubar.selectionBackground #24273d
menubar.selectionBorder #c700ff00
menubar.selectionForeground #f5f5f5
merge.commonContentBackground #282828
merge.commonHeaderBackground #383838
merge.currentContentBackground #27403B
merge.currentHeaderBackground #306b5e
merge.incomingContentBackground #28384B
merge.incomingHeaderBackground #2c4c75
minimap.background #121421
minimap.errorHighlight #07a7a7
minimap.findMatchHighlight #a5a5a550
minimap.selectionHighlight #1d1e5c
minimap.warningHighlight #dbd945
minimapGutter.addedBackground #509d1b
minimapGutter.deletedBackground #ad1b21
minimapGutter.modifiedBackground #186d96
notificationCenter.border #23253d
notificationCenterHeader.background #242736
notificationCenterHeader.foreground #b4b4b4
notifications.background #1c1f2c
notifications.border #242d3d
notifications.foreground #68a2cd
notificationsErrorIcon.foreground #f48771
notificationsInfoIcon.foreground #5dd3a2
notificationsWarningIcon.foreground #cca700
notificationToast.border #24284783
panel.background #121421
panel.border #44406068
panelSection.border #373958ad
panelTitle.activeBorder #00ba97f1
panelTitle.activeForeground #00ffcf
panelTitle.inactiveForeground #00e8bcb7
peekView.border #24273b
peekViewEditor.background #1b2336
peekViewEditor.matchHighlightBackground #2f9f4556
peekViewEditor.matchHighlightBorder #2c7d67
peekViewEditorGutter.background #151e32db
peekViewResult.background #151e32db
peekViewResult.fileForeground #00e0d9
peekViewResult.lineForeground #e6e201
peekViewResult.matchHighlightBackground #ff640038
peekViewResult.selectionBackground #44469433
peekViewResult.selectionForeground #c4c4c4
peekViewTitle.background #111726
peekViewTitleDescription.foreground #b2b2b2b3
peekViewTitleLabel.foreground #f2d800
pickerGroup.border #00000000
pickerGroup.foreground #6e8bab
progressBar.background #00ffc3
scrollbar.shadow #282828
scrollbarSlider.activeBackground #33334191
scrollbarSlider.background #49485a20
scrollbarSlider.hoverBackground #49485a20
selection.background #00f3ff3c
settings.focusedRowBackground #ffffff07
settings.headerForeground #54ffa7dd
sideBar.background #181b28
sideBar.border #000000
sideBar.dropBackground #2c2c43cb
sideBar.foreground #b1e2ff
sideBarSectionHeader.background #ffffff00
sideBarSectionHeader.border #00000054
sideBarSectionHeader.foreground #b1e2ff
sideBarTitle.foreground #3affb5
statusBar.background #24253d
statusBar.border #000000
statusBar.debuggingBackground #2b2645
statusBar.debuggingBorder #000000
statusBar.debuggingForeground #68d9c9
statusBar.foreground #f2d800
statusBar.noFolderBackground #2c7b56
statusBar.noFolderBorder #000000
statusBar.noFolderForeground #ffffff
statusBarItem.activeBackground #FFFFFF25
statusBarItem.hoverBackground #1b142ad9
statusBarItem.remoteBackground #365446
statusBarItem.remoteForeground #00ffdb
tab.activeBackground #232636
tab.activeBorder #5affb2
tab.activeBorderTop #5affb200
tab.activeForeground #ffe300
tab.border #25252600
tab.hoverBorder #00000000
tab.inactiveBackground #292c3e
tab.inactiveForeground #ffffff80
terminal.ansiBlack #cb8989
terminal.ansiBlue #2472c8
terminal.ansiBrightBlack #cb9c54
terminal.ansiBrightBlue #3b8eea
terminal.ansiBrightCyan #29b8db
terminal.ansiBrightGreen #23d18b
terminal.ansiBrightMagenta #e8a9e8
terminal.ansiBrightRed #ff6161
terminal.ansiBrightWhite #f2f2f2
terminal.ansiBrightYellow #ffff33
terminal.ansiCyan #11a8cd
terminal.ansiGreen #0dbc79
terminal.ansiMagenta #c73cc7
terminal.ansiRed #d51d1d
terminal.ansiWhite #cbcbcb
terminal.ansiYellow #d1d100f3
terminal.border #373958ad
terminal.foreground #5cbbcb
terminal.selectionBackground #31477d32
terminalCursor.background #000000
terminalCursor.foreground #fffb00
textLink.foreground #48a9ff
titleBar.activeBackground #1b1e2b
titleBar.activeForeground #b1e2ff
titleBar.border #000000
titleBar.inactiveBackground #1b1e2b
titleBar.inactiveForeground #b1e2ff
tree.indentGuidesStroke #a3a100
walkThrough.embeddedEditorBackground #00000050
widget.shadow #0d0c115c #e87676
punctuation.separator.period.python,punctuation.separator.element.python,punctuation.parenthesis.begin.python,punctuation.parenthesis.end.python #07cfbc —
variable.parameter.function.language.special.self.python #e68810 —
storage.modifier.lifetime.rust #07cfbc —
support.function.std.rust #59b4ff —
entity.name.lifetime.rust #e68810 —
variable.language.rust #e87676 —
support.constant.edge #c573de —
constant.other.character-class.regexp #e87676 —
keyword.operator.quantifier.regexp #00e2b7 —
punctuation.definition.string.begin,punctuation.definition.string.end #26cd6f —
variable.parameter.function #07cfbc —
comment markup.link #656f8e —
markup.changed.diff #e68810 —
meta.diff.header.from-file,meta.diff.header.to-file,punctuation.definition.from-file.diff,punctuation.definition.to-file.diff #59b4ff —
markup.inserted.diff #26cd6f —
markup.deleted.diff #e87676 —
meta.function.c,meta.function.cpp #e87676 —
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 #07cfbc —
punctuation.separator.key-value #07cfbc —
keyword.operator.expression.import #59b4ff —
support.constant.math #e68810 —
support.constant.property.math #00e2b7 —
variable.other.constant #e68810 —
storage.type.annotation.java, storage.type.object.array.java #e68810 —
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 #07cfbc —
storage.modifier.import.java,storage.type.java,storage.type.generic.java #e68810 —
keyword.operator.instanceof.java #c573de —
meta.definition.variable.name.java #e87676 —
keyword.operator.logical #3cc9c2 —
keyword.operator.bitwise #3cc9c2 —
keyword.operator.channel #3cc9c2 —
support.constant.property-value.scss,support.constant.property-value.css #00e2b7 —
keyword.operator.css,keyword.operator.scss,keyword.operator.less #3cc9c2 —
support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss #00e2b7 —
punctuation.separator.list.comma.css #07cfbc —
support.constant.color.w3c-standard-color-name.css #00e2b7 —
support.type.vendored.property-name.css #3cc9c2 —
support.module.node,support.type.object.module,support.module.node #e68810 —
entity.name.type.module #e68810 —
variable.other.readwrite,meta.object-literal.key,support.variable.property,support.variable.object.process,support.variable.object.node #e87676 —
support.constant.json #00e2b7 —
keyword.operator.expression.instanceof, keyword.operator.new, keyword.operator.ternary, keyword.operator.optional, keyword.operator.expression.keyof #c573de —
support.type.object.console #e87676 —
support.variable.property.process #00e2b7 —
entity.name.function,support.function.console #59b4ff —
keyword.operator.misc.rust #07cfbc —
keyword.operator.sigil.rust #c573de —
keyword.operator.delete #c573de —
support.type.object.dom #3cc9c2 —
support.variable.dom,support.variable.property.dom #e87676 —
keyword.operator.arithmetic,keyword.operator.comparison,keyword.operator.decrement,keyword.operator.increment,keyword.operator.relational #3cc9c2 —
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 #c573de —
punctuation.separator.delimiter #07cfbc —
punctuation.separator.c,punctuation.separator.cpp #c573de —
support.type.posix-reserved.c,support.type.posix-reserved.cpp #3cc9c2 —
keyword.operator.sizeof.c,keyword.operator.sizeof.cpp #c573de —
variable.parameter.function.language.python #00e2b7 —
support.type.python #3cc9c2 —
keyword.operator.logical.python #c573de —
variable.parameter.function.python #00e2b7 —
punctuation.definition.arguments.begin.python,punctuation.definition.arguments.end.python,punctuation.separator.arguments.python,punctuation.definition.list.begin.python,punctuation.definition.list.end.python #07cfbc —
meta.function-call.generic.python #59b4ff —
constant.character.format.placeholder.other.python #00e2b7 —
keyword.operator.assignment.compound #c573de —
keyword.operator.assignment.compound.js,keyword.operator.assignment.compound.ts #3cc9c2 —
entity.name.namespace #e68810 —
variable.language #e68810 —
token.variable.parameter.java #07cfbc —
import.storage.java #e68810 —
token.package.keyword #c573de —
entity.name.function, meta.require, support.function.any-method, variable.function #59b4ff —
entity.name.type.namespace #e68810 —
support.class, entity.name.type.class #e68810 —
entity.name.class.identifier.namespace.type #e68810 —
entity.name.class, variable.other.class.js, variable.other.class.ts #e68810 —
variable.other.class.php #e87676 —
control.elements, keyword.operator.less #00e2b7 —
keyword.other.special-method #59b4ff —
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 #c573de —
token.storage.type.java #e68810 —
support.type.property-name #07cfbc —
support.constant.property-value #07cfbc —
support.constant.font-name #00e2b7 —
entity.other.inherited-class #e68810 —
constant.other.symbol #3cc9c2 —
punctuation.definition.constant #00e2b7 —
entity.other.attribute-name #00e2b7 —
entity.other.attribute-name.id #59b4ff normal
entity.other.attribute-name.class.css #00e2b7 normal
markup.heading punctuation.definition.heading, entity.name.section #59b4ff —
keyword.other.unit #e87676 —
markup.bold,todo.bold #00e2b7 —
punctuation.definition.bold #e68810 —
markup.italic, punctuation.definition.italic,todo.emphasis #c573de —
entity.name.section.markdown #e87676 —
punctuation.definition.heading.markdown #e87676 —
punctuation.definition.list.begin.markdown #e87676 —
markup.heading.setext #07cfbc —
punctuation.definition.bold.markdown #00e2b7 —
markup.inline.raw.markdown #26cd6f —
markup.inline.raw.string.markdown #26cd6f —
punctuation.definition.list.markdown #e87676 —
punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown #e87676 —
beginning.punctuation.definition.list.markdown #e87676 —
punctuation.definition.metadata.markdown #e87676 —
markup.underline.link.markdown,markup.underline.link.image.markdown #c573de —
string.other.link.title.markdown,string.other.link.description.markdown #59b4ff —
constant.character.escape #3cc9c2 —
punctuation.section.embedded, variable.interpolation #e87676 —
punctuation.section.embedded.begin,punctuation.section.embedded.end #c573de —
invalid.illegal.bad-ampersand.html #07cfbc —
invalid.deprecated #ffffff —
invalid.unimplemented #ffffff —
source.json meta.structure.dictionary.json > string.quoted.json #e87676 —
source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string #e87676 —
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 #26cd6f —
source.json meta.structure.dictionary.json > constant.language.json,source.json meta.structure.array.json > constant.language.json #3cc9c2 —
support.type.property-name.json #e87676 —
support.type.property-name.json punctuation #e87676 —
text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade #c573de —
text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade #c573de —
support.other.namespace.use.php,support.other.namespace.use-as.php,support.other.namespace.php,entity.other.alias.php,meta.interface.php #e68810 —
keyword.operator.error-control.php #c573de —
keyword.operator.type.php #c573de —
punctuation.section.array.begin.php #07cfbc —
punctuation.section.array.end.php #07cfbc —
invalid.illegal.non-null-typehinted.php #f44747 —
storage.type.php,meta.other.type.phpdoc.php,keyword.other.type.php,keyword.other.array.phpdoc.php #e68810 —
meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php #59b4ff —
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 #07cfbc —
support.constant.core.rust #00e2b7 —
support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php #00e2b7 —
entity.name.goto-label.php,support.other.php #59b4ff —
keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php #3cc9c2 —
keyword.operator.regexp.php #c573de —
keyword.operator.comparison.php #3cc9c2 —
keyword.operator.heredoc.php,keyword.operator.nowdoc.php #c573de —
meta.function.decorator.python #59b4ff —
support.token.decorator.python,meta.function.decorator.identifier.python #3cc9c2 —
function.parameter #07cfbc —
function.parameter.ruby, function.parameter.cs #07cfbc —
constant.language.symbol.ruby #3cc9c2 —
inline-color-decoration rgb-value #00e2b7 —
support.type.primitive.ts,support.type.builtin.ts,support.type.primitive.tsx,support.type.builtin.tsx #e68810 —
block.scope.end,block.scope.begin #07cfbc —
entity.name.variable.local.cs #e87676 —
token.error-token #f44747 —
token.debug-token #c573de —
punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded #c573de —
meta.template.expression #07cfbc —
keyword.operator.module #c573de —
support.type.type.flowtype #59b4ff —
support.type.primitive #e68810 —
meta.property.object #e87676 —
variable.parameter.function.js #e87676 —
keyword.other.template.begin #26cd6f —
keyword.other.template.end #26cd6f —
keyword.other.substitution.begin #26cd6f —
keyword.other.substitution.end #26cd6f —
keyword.operator.assignment #3cc9c2 —
keyword.operator.assignment.go #e68810 —
keyword.operator.arithmetic.go, keyword.operator.address.go #c573de —
entity.name.package.go #e68810 —
support.type.prelude.elm #3cc9c2 —
support.constant.elm #00e2b7 —
punctuation.quasi.element #c573de —
constant.character.entity #e87676 —
entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class #3cc9c2 —
entity.global.clojure #e68810 —
meta.symbol.clojure #e87676 —
constant.keyword.clojure #3cc9c2 —
meta.arguments.coffee, variable.parameter.function.coffee #e87676 —
meta.scope.prerequisites.makefile #e87676 —
storage.modifier.import.groovy #e68810 —
meta.method.groovy #59b4ff —
meta.definition.variable.name.groovy #e87676 —
meta.definition.class.inherited.classes.groovy #26cd6f —
support.variable.semantic.hlsl #e68810 —
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 #c573de —
text.variable, text.bracketed #e87676 —
support.type.swift, support.type.vb.asp #e68810 —
entity.name.function.xi #e68810 —
entity.name.class.xi #3cc9c2 —
constant.character.character-class.regexp.xi #e87676 —
constant.regexp.xi #c573de —
keyword.control.xi #3cc9c2 —
beginning.punctuation.definition.quote.markdown.xi #26cd6f —
beginning.punctuation.definition.list.markdown.xi #656f8e —
constant.character.xi #59b4ff —
constant.other.color.rgb-value.xi #ffffff —
punctuation.definition.tag.xi #656f8e —
entity.name.label.cs, entity.name.scope-resolution.function.call, entity.name.scope-resolution.function.definition #e68810 —
entity.name.label.cs, markup.heading.setext.1.markdown, markup.heading.setext.2.markdown #e87676 —
meta.brace.square #07cfbc —
comment, punctuation.definition.comment #656f8e italic
markup.quote.markdown #656f8e —
punctuation.definition.block.sequence.item.yaml #07cfbc —
constant.language.symbol.elixir #3cc9c2 —
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 } !` ;
}