Skip to main content
Dark Midnight (Contrast) | 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.background #333333 activityBar.foreground #ffffff activityBar.inactiveForeground #ffffff66 activityBarBadge.background #007acc activityBarBadge.foreground #ffffff badge.background #4d4d4d 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 #c51a1a — variable.other.generic-type.haskell #076ac7 — storage.type.haskell #F29843E0 — support.variable.magic.python
Shiki preview TypeScript sample highlighted with this variant's colors and tokenColors.
Dark Midnight (Contrast) — Dark Theme by Marcelo
badge.foreground
#ffffff
breadcrumb.activeSelectionForeground #e0e0e0
breadcrumb.background #1e1e1e
breadcrumb.focusForeground #e0e0e0
breadcrumb.foreground #cccccccc
button.background #0e639c
button.foreground #ffffff
button.hoverBackground #1177bb
button.secondaryBackground #3a3d41
button.secondaryForeground #ffffff
button.secondaryHoverBackground #45494e
checkbox.background #3c3c3c
checkbox.border #00000000
checkbox.foreground #cccccc
debugExceptionWidget.background #333333
debugExceptionWidget.border #474747
debugToolBar.background #333333
debugToolBar.border #5a5959
diffEditor.border #444444
diffEditor.insertedTextBackground #9bb95533
diffEditor.removedTextBackground #ff000033
dropdown.background #3c3c3c
dropdown.border #00000000
dropdown.foreground #cccccc
editor.background #000000
editor.findMatchBackground #515c6a97
editor.findMatchBorder #878e9699
editor.findMatchHighlightBackground #514a117a
editor.findMatchHighlightBorder #ffffff00
editor.findRangeHighlightBackground #363e4752
editor.findRangeHighlightBorder #ffffff00
editor.foldBackground #264f7850
editor.foreground #e1e1e1
editor.hoverHighlightBackground #264f7868
editor.inactiveSelectionBackground #3a3d4199
editor.lineHighlightBackground #ffffff0c
editor.lineHighlightBorder #4d4d4d
editor.rangeHighlightBackground #ffffff00
editor.rangeHighlightBorder #ffffff00
editor.selectionBackground #122334
editor.selectionHighlightBackground #0f151b
editor.selectionHighlightBorder #495f77
editor.wordHighlightBackground #4547446a
editor.wordHighlightStrongBackground #182f3db8
editorBracketMatch.background #00640038
editorBracketMatch.border #63717d
editorCodeLens.foreground #999999
editorCursor.background #000000
editorCursor.foreground #e6e0e0
editorError.background #B73A3400
editorError.border #ffffff00
editorError.foreground #b43d23
editorGroup.border #444444
editorGroup.emptyBackground #000000
editorGroupHeader.tabsBackground #252526
editorGutter.addedBackground #5c9433
editorGutter.background #000000
editorGutter.commentRangeForeground #c5c5c5
editorGutter.deletedBackground #c51a1a
editorGutter.foldingControlForeground #c5c5c5
editorGutter.modifiedBackground #076ac7
editorHoverWidget.background #252526
editorHoverWidget.border #454545
editorHoverWidget.foreground #cccccc
editorIndentGuide.activeBackground #707070
editorIndentGuide.background #404040d7
editorInfo.background #4490bf00
editorInfo.border #4490BF00
editorInfo.foreground #2872b4
editorLineNumber.activeForeground #f7f3f3
editorLineNumber.foreground #585757
editorLink.activeForeground #4e94ce
editorMarkerNavigation.background #2d2d30
editorMarkerNavigationError.background #f48771
editorMarkerNavigationInfo.background #75beff
editorMarkerNavigationWarning.background #cca700
editorOverviewRuler.background #25252500
editorOverviewRuler.border #7f7f7f50
editorRuler.foreground #5a5a5a00
editorSuggestWidget.background #010a0e
editorSuggestWidget.border #d864069b
editorSuggestWidget.foreground #e1e1e1
editorSuggestWidget.highlightForeground #d86406
editorSuggestWidget.selectedBackground #031f5877
editorWarning.background #A9904000
editorWarning.border #ffffff00
editorWarning.foreground #ad910e
editorWhitespace.foreground #e3e4e21a
editorWidget.background #16161b
editorWidget.foreground #eaeaea
editorWidget.resizeBorder #646464
focusBorder #007fd4
foreground #cccccc
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 #cccccc
input.background #3c3c3c
input.border #00000000
input.foreground #cccccc
input.placeholderForeground #a6a6a6
inputOption.activeBackground #007fd466
inputOption.activeBorder #007acc00
inputOption.activeForeground #ffffff
list.activeSelectionBackground #0c324b
list.activeSelectionForeground #e1e1e1
list.dropBackground #232b30
list.focusBackground #0f2736
list.focusForeground #e1e1e1
list.highlightForeground #d86406
list.hoverBackground #d7d7d73a
list.hoverForeground #e1e1e1
list.inactiveSelectionBackground #282843
list.inactiveSelectionForeground #e1e1e1
listFilterWidget.background #183d4f
listFilterWidget.noMatchesOutline #be110000
listFilterWidget.outline #00000000
menu.background #252526
menu.border #00000085
menu.foreground #cccccc
menu.selectionBackground #094771
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 #000000
minimap.errorHighlight #f48771
minimap.findMatchHighlight #515c6a
minimap.selectionHighlight #28435e
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 #f48771
notificationsInfoIcon.foreground #75beff
notificationsWarningIcon.foreground #cca700
notificationToast.border #474747
panel.background #1e1e1e
panel.border #80808059
panelSection.border #80808059
panelTitle.activeBorder #e7e7e7
panelTitle.activeForeground #e7e7e7
panelTitle.inactiveForeground #e7e7e799
peekView.border #0764c7
peekViewEditor.background #011a2b
peekViewEditor.matchHighlightBackground #ff8f0050
peekViewEditor.matchHighlightBorder #ee931e99
peekViewEditorGutter.background #001421
peekViewResult.background #25252680
peekViewResult.fileForeground #e1e1e1
peekViewResult.lineForeground #bbbbbb
peekViewResult.matchHighlightBackground #ea5c004d
peekViewResult.selectionBackground #3399ff33
peekViewResult.selectionForeground #ffffff
peekViewTitle.background #1e1e1e
peekViewTitleDescription.foreground #ccccccb3
peekViewTitleLabel.foreground #ffffff
pickerGroup.border #d0640691
pickerGroup.foreground #d86406
progressBar.background #0e70c0
scrollbar.shadow #000000
scrollbarSlider.activeBackground #bfbfbf66
scrollbarSlider.background #79797966
scrollbarSlider.hoverBackground #646464b3
selection.background #256aa7
settings.focusedRowBackground #ffffff07
settings.headerForeground #cccccc
sideBar.background #090D0F
sideBar.dropBackground #383b3d
sideBar.foreground #e1e1e1
sideBarSectionHeader.background #4f414100
sideBarSectionHeader.border #03495e80
sideBarSectionHeader.foreground #e8e8e8
sideBarTitle.foreground #e1e1e1
statusBar.background #007acc
statusBar.debuggingBackground #cc6633
statusBar.debuggingForeground #ffffff
statusBar.foreground #ffffff
statusBar.noFolderBackground #68217a
statusBar.noFolderForeground #ffffff
statusBarItem.activeBackground #FFFFFF25
statusBarItem.hoverBackground #ffffff1f
statusBarItem.remoteBackground #16825d
statusBarItem.remoteForeground #ffffff
tab.activeBackground #1e1e1e
tab.activeBorder #00000000
tab.activeBorderTop #00000000
tab.activeForeground #ffffff
tab.border #252526
tab.inactiveBackground #2d2d2d
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 #3794ff
titleBar.activeBackground #3c3c3c
titleBar.activeForeground #cccccc
titleBar.border #00000000
titleBar.inactiveBackground #3c3c3c99
titleBar.inactiveForeground #cccccc99
tree.indentGuidesStroke #4b4b4b
walkThrough.embeddedEditorBackground #00000050
widget.shadow #00000000 #c51a1a
punctuation.separator.period.python,punctuation.separator.element.python,punctuation.parenthesis.begin.python,punctuation.parenthesis.end.python #e8e8e8 —
variable.parameter.function.language.special.self.python #d86406 —
storage.modifier.lifetime.rust #e8e8e8 —
support.function.std.rust #3daa7d —
entity.name.lifetime.rust #d86406 —
variable.language.rust #c51a1a —
support.constant.edge #076ac7 —
constant.other.character-class.regexp #c51a1a —
keyword.operator.quantifier.regexp #F29843E0 —
punctuation.definition.string.begin,punctuation.definition.string.end #e1e1e1 —
variable.parameter.function #e8e8e8 —
comment markup.link #5c6066 —
markup.changed.diff #d86406 —
meta.diff.header.from-file,meta.diff.header.to-file,punctuation.definition.from-file.diff,punctuation.definition.to-file.diff #3daa7d —
markup.inserted.diff #5c9433 —
markup.deleted.diff #c51a1a —
meta.function.c,meta.function.cpp #c51a1a —
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 #e8e8e8 —
punctuation.separator.key-value #e8e8e8 —
punctuation.separator.key-value.html #e1e1e1 —
keyword.operator.expression.import #3daa7d —
support.constant.math #d86406 —
support.constant.property.math #F29843E0 —
variable.other.constant #e65800e0 —
storage.type.annotation.java, storage.type.object.array.java #d86406 —
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 #e8e8e8 —
storage.modifier.import.java,storage.type.java,storage.type.generic.java #d86406 —
keyword.operator.instanceof.java #076ac7 —
meta.definition.variable.name.java #c51a1a —
keyword.operator.logical #d3d3d3 —
keyword.operator.bitwise #d3d3d3 —
keyword.operator.channel #d3d3d3 —
support.constant.property-value.scss,support.constant.property-value.css #0597bb —
keyword.operator.css,keyword.operator.scss,keyword.operator.less #d3d3d3 —
support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss #F29843E0 —
punctuation.separator.list.comma.css #e8e8e8 —
support.constant.color.w3c-standard-color-name.css #F29843E0 —
support.type.vendored.property-name.css #e65800e0 —
support.module.node,support.type.object.module,support.module.node #d86406 —
entity.name.type.module #d86406 —
variable.other.readwrite,meta.object-literal.key,support.variable.property,support.variable.object.process,support.variable.object.node #e65800e0 —
support.constant.json #F29843E0 —
keyword.operator.expression.instanceof, keyword.operator.new, keyword.operator.ternary, keyword.operator.optional, keyword.operator.expression.keyof #076ac7 —
support.type.object.console #c51a1a —
support.variable.property.process #F29843E0 —
entity.name.function,support.function.console #3daa7d —
keyword.operator.misc.rust #e8e8e8 —
keyword.operator.sigil.rust #076ac7 —
keyword.operator.delete #076ac7 —
support.type.object.dom #d3d3d3 —
support.variable.dom,support.variable.property.dom #c51a1a —
keyword.operator.arithmetic,keyword.operator.comparison,keyword.operator.decrement,keyword.operator.increment,keyword.operator.relational #e1e1e1 —
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 #076ac7 —
punctuation.separator.delimiter #e8e8e8 —
punctuation.separator.c,punctuation.separator.cpp #076ac7 —
support.type.posix-reserved.c,support.type.posix-reserved.cpp #d3d3d3 —
keyword.operator.sizeof.c,keyword.operator.sizeof.cpp #076ac7 —
variable.parameter.function.language.python #F29843E0 —
support.type.python #d3d3d3 —
keyword.operator.logical.python #076ac7 —
variable.parameter.function.python #F29843E0 —
punctuation.definition.arguments.begin.python,punctuation.definition.arguments.end.python,punctuation.separator.arguments.python,punctuation.definition.list.begin.python,punctuation.definition.list.end.python #e8e8e8 —
meta.function-call.generic.python #3daa7d —
constant.character.format.placeholder.other.python #F29843E0 —
keyword.operator.assignment.compound #076ac7 —
keyword.operator.assignment.compound.js,keyword.operator.assignment.compound.ts #d3d3d3 —
entity.name.namespace #d86406 —
variable.language #d86406 —
token.variable.parameter.java #e8e8e8 —
import.storage.java #d86406 —
token.package.keyword #076ac7 —
entity.name.function, meta.require, support.function.any-method, variable.function #f12652e7 —
entity.name.type.namespace #d86406 —
support.class, entity.name.type.class #d86406 —
entity.name.class.identifier.namespace.type #d86406 —
entity.name.class, variable.other.class.js, variable.other.class.ts #d86406 —
variable.other.class.php #c51a1a —
variable.other.property.js #0597BB —
control.elements, keyword.operator.less #F29843E0 —
keyword.other.special-method #3daa7d —
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 #0597bb —
token.storage.type.java #d86406 —
support.type.property-name #e65800e0 —
support.constant.property-value #e8e8e8 —
support.constant.font-name #f29843e0 —
punctuation.definition.string.template.begin.js,punctuation.definition.string.template.end.js #e65800e0 —
entity.other.inherited-class #d86406 —
constant.other.symbol #d3d3d3 —
punctuation.definition.constant #F29843E0 —
entity.other.attribute-name #f29843e0 —
entity.other.attribute-name.id #f12652e7 —
entity.other.attribute-name.class.css #f29843e0 —
markup.heading punctuation.definition.heading, entity.name.section #3daa7d —
constant.numeric.decimal.js #e65800e0 —
constant.numeric.octal.js #f12652e7 —
punctuation.section.function.begin.bracket.round.css #e65800e0 —
keyword.other.unit #e65800e0 —
markup.bold,todo.bold #F29843E0 —
punctuation.definition.bold #d86406 —
markup.italic, punctuation.definition.italic,todo.emphasis #076ac7 —
entity.name.section.markdown #c51a1a —
punctuation.definition.heading.markdown #c51a1a —
punctuation.definition.list.begin.markdown #c51a1a —
markup.heading.setext #e8e8e8 —
punctuation.definition.bold.markdown #F29843E0 —
punctuation.definition.string.end.html,punctuation.definition.string.begin.html,punctuation.definition.string.end.css,punctuation.definition.string.begin.css #e1e1e1 —
markup.inline.raw.markdown #5c9433 —
markup.inline.raw.string.markdown #5c9433 —
punctuation.definition.list.markdown #c51a1a —
punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown #c51a1a —
beginning.punctuation.definition.list.markdown #c51a1a —
punctuation.definition.metadata.markdown #c51a1a —
markup.underline.link.markdown,markup.underline.link.image.markdown #076ac7 —
string.other.link.title.markdown,string.other.link.description.markdown #3daa7d —
constant.character.escape #d3d3d3 —
punctuation.section.embedded, variable.interpolation #c51a1a —
punctuation.section.embedded.begin,punctuation.section.embedded.end #076ac7 —
invalid.illegal.bad-ampersand.html #e8e8e8 —
invalid.deprecated #b385fd —
invalid.unimplemented #ffffff —
string.quoted.single.js,string.quoted.double.js #f29843e0 —
string.quoted.double.html #0597bb —
string.quoted.single.html #0597bb —
string.quoted.single.css,meta.property-value.css #56a6e6 —
source.json meta.structure.dictionary.json > string.quoted.json #c51a1a —
source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string #c51a1a —
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 #5c9433 —
source.json meta.structure.dictionary.json > constant.language.json,source.json meta.structure.array.json > constant.language.json #d3d3d3 —
support.type.property-name.json #c51a1a —
support.type.property-name.json punctuation #c51a1a —
text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade #076ac7 —
text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade #076ac7 —
entity.other.keyframe-offset.css #f12652e7 —
punctuation.section.keyframes.end.bracket.curly.css #e1e1e1
meta.brace.round.js #e1e1e1 —
variable.parameter.keyframe-list.css #cf1b1b
storage.type.js,storage.type.function.js,variable.other.object.js,entity.name.function.js #0597BB —
support.other.namespace.use.php,support.other.namespace.use-as.php,support.other.namespace.php,entity.other.alias.php,meta.interface.php #d86406 —
keyword.operator.error-control.php #076ac7 —
keyword.operator.type.php #076ac7 —
punctuation.section.array.begin.php #e8e8e8 —
punctuation.section.array.end.php #e8e8e8 —
invalid.illegal.non-null-typehinted.php #f44747 —
storage.type.php,meta.other.type.phpdoc.php,keyword.other.type.php,keyword.other.array.phpdoc.php #d86406 —
meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php #3daa7d —
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 #e8e8e8 —
support.constant.core.rust #F29843E0 —
support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php #F29843E0 —
entity.name.goto-label.php,support.other.php #3daa7d —
keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php #d3d3d3 —
keyword.operator.regexp.php #076ac7 —
keyword.operator.comparison.php #d3d3d3 —
keyword.operator.heredoc.php,keyword.operator.nowdoc.php #076ac7 —
meta.function.decorator.python #3daa7d —
support.token.decorator.python,meta.function.decorator.identifier.python #d3d3d3 —
function.parameter #e8e8e8 —
function.parameter.ruby, function.parameter.cs #e8e8e8 —
constant.language.symbol.ruby #d3d3d3 —
inline-color-decoration rgb-value #F29843E0 —
constant.other.color.rgb-value.hex.css #f29843e0 —
support.type.primitive.ts,support.type.builtin.ts,support.type.primitive.tsx,support.type.builtin.tsx #d86406 —
block.scope.end,block.scope.begin #e8e8e8 —
entity.name.variable.local.cs #c51a1a —
token.warn-token #F29843E0 —
token.error-token #f44747 —
token.debug-token #076ac7 —
punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded #0597bb —
meta.template.expression #e8e8e8 —
keyword.operator.module #076ac7 —
support.type.type.flowtype #3daa7d —
support.type.primitive #d86406 —
meta.property.object #c51a1a —
variable.parameter.function.js #c51a1a —
keyword.other.template.begin #5c9433 —
keyword.other.template.end #5c9433 —
keyword.other.substitution.begin #5c9433 —
keyword.other.substitution.end #5c9433 —
keyword.operator.assignment #d3d3d3 —
keyword.operator.assignment.go #d86406 —
keyword.operator.arithmetic.go, keyword.operator.address.go #076ac7 —
entity.name.package.go #d86406 —
support.type.prelude.elm #d3d3d3 —
support.constant.elm #F29843E0 —
punctuation.quasi.element #076ac7 —
constant.character.entity #c51a1a —
entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class #f29843e0 —
meta.property-value.css #f29843e0 —
keyword.control.conditional.js #cf1b1b —
entity.global.clojure #d86406 —
meta.symbol.clojure #c51a1a —
constant.keyword.clojure #d3d3d3 —
meta.arguments.coffee, variable.parameter.function.coffee #c51a1a —
meta.scope.prerequisites.makefile #c51a1a —
storage.modifier.import.groovy #d86406 —
meta.method.groovy #3daa7d —
meta.definition.variable.name.groovy #c51a1a —
meta.definition.class.inherited.classes.groovy #5c9433 —
support.variable.semantic.hlsl #d86406 —
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 #076ac7 —
text.variable, text.bracketed #c51a1a —
support.type.swift, support.type.vb.asp #d86406 —
entity.name.function.xi #d86406 —
entity.name.class.xi #d3d3d3 —
constant.character.character-class.regexp.xi #c51a1a —
constant.regexp.xi #076ac7 —
keyword.control.xi #d3d3d3 —
beginning.punctuation.definition.quote.markdown.xi #5c9433 —
beginning.punctuation.definition.list.markdown.xi #5c6066 —
constant.character.xi #3daa7d —
constant.other.color.rgb-value.xi #ffffff —
punctuation.definition.tag.xi #5c6066 —
entity.name.label.cs, entity.name.scope-resolution.function.call, entity.name.scope-resolution.function.definition #d86406 —
entity.name.label.cs, markup.heading.setext.1.markdown, markup.heading.setext.2.markdown #c51a1a —
meta.function.js,meta.brace.square.js #e1e1e1 —
meta.brace.square.js #0597bb —
meta.brace.square #e8e8e8 —
comment, punctuation.definition.comment #5c6066 italic
markup.quote.markdown #5c6066 —
punctuation.definition.block.sequence.item.yaml #e8e8e8 —
constant.language.symbol.elixir #d3d3d3 —
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 —
comment.line.double-slash,comment.block.documentation — italic
keyword.control.import.python,keyword.control.flow.python —
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 } !` ;
}