Skip to main content
VS Code preview Full workbench mockup using this variant's colors and tokenColors.
colors Workbench UI color keys from the theme JSON colors map.
activityBar.background #161c24 activityBar.foreground #ffffff activityBar.inactiveForeground #ffffff60 activityBarBadge.background #00d8ff activityBarBadge.foreground #000000 badge.background #FFFFFF1A 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 #f2f2f2 — variable.css #80CBC4 — variable.argument.css #efbc6b — variable.other.generic-type.haskell #cab0ff
Shiki preview TypeScript sample highlighted with this variant's colors and tokenColors.
Photon Racer — Photon Racer
badge.foreground
#ffffff
breadcrumb.activeSelectionForeground #ffffff
breadcrumb.background #161c24
breadcrumb.focusForeground #ffffff
breadcrumb.foreground #f0f0f0cc
button.background #0e639c
button.foreground #ffffff
button.hoverBackground #1177bb
button.secondaryBackground #3a3d41
button.secondaryForeground #ffffff
button.secondaryHoverBackground #45494e
checkbox.background #151515
checkbox.border #00000000
checkbox.foreground #cccccc
debugExceptionWidget.background #333333
debugExceptionWidget.border #474747
debugToolBar.background #333333
debugToolBar.border #474747
diffEditor.border #151515
diffEditor.insertedTextBackground #21922340
diffEditor.removedTextBackground #FF10101F
dropdown.background #151515
dropdown.border #00000000
dropdown.foreground #cccccc
editor.background #161c24
editor.findMatchBackground #f8e71c
editor.findMatchBorder #ffffff00
editor.findMatchHighlightBackground #32424a
editor.findMatchHighlightBorder #ffffff00
editor.findRangeHighlightBackground #374b666e
editor.findRangeHighlightBorder #e4434300
editor.foldBackground #264f784d
editor.foreground #f2f2f2
editor.hoverHighlightBackground #12404b
editor.inactiveSelectionBackground #42474d
editor.lineHighlightBackground #67676b48
editor.lineHighlightBorder #282727db
editor.rangeHighlightBackground #ffffff0b
editor.rangeHighlightBorder #ffffff00
editor.selectionBackground #25435f
editor.selectionHighlightBackground #155260
editor.selectionHighlightBorder #b6b6b69b
editor.wordHighlightBackground #32424a
editor.wordHighlightStrongBackground #004972b8
editorBracketMatch.background #FFFFFF1A
editorBracketMatch.border #FFFFFF24
editorCodeLens.foreground #B9B9B9
editorCursor.background #000000
editorCursor.foreground #efbc6b
editorError.background #B73A3400
editorError.border #ffffff00
editorError.foreground #ff5370
editorGroup.border #151515
editorGroup.emptyBackground #161c24
editorGroupHeader.tabsBackground #161c24
editorGroupHeader.tabsBorder #f2f2f22a
editorGutter.addedBackground #efbc6b
editorGutter.background #161c24
editorGutter.commentRangeForeground #cfcdcd
editorGutter.deletedBackground #BF0F0F
editorGutter.foldingControlForeground #cfcdcd
editorGutter.modifiedBackground #0c7d9d
editorHoverWidget.background #191919
editorHoverWidget.border #a99e9e
editorHoverWidget.foreground #f9f3f3
editorIndentGuide.activeBackground #81acb289
editorIndentGuide.background #ffffff0f
editorInfo.background #4490BF00
editorInfo.border #4490BF00
editorInfo.foreground #00d8ff
editorLineNumber.activeForeground #A0A0A0
editorLineNumber.foreground #425772
editorLink.activeForeground #6097b9
editorMarkerNavigation.background #1D1D1D
editorMarkerNavigationError.background #ff5370
editorMarkerNavigationInfo.background #00d8ff
editorMarkerNavigationWarning.background #ffcb6b
editorOverviewRuler.background #25252500
editorOverviewRuler.border #FFFFFF0F
editorRuler.foreground #FFFFFF14
editorSuggestWidget.background #191919
editorSuggestWidget.border #0A0A0A
editorSuggestWidget.foreground #7D7D7D
editorSuggestWidget.highlightForeground #0097fb
editorSuggestWidget.selectedBackground #062f4a
editorWarning.background #A9904000
editorWarning.border #ffffff00
editorWarning.foreground #ffcb6b
editorWhitespace.foreground #FFFFFF14
editorWidget.background #252526
editorWidget.foreground #cccccc
editorWidget.resizeBorder #5F5F5F
focusBorder #616161
foreground #CECECE
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 #CECECE
input.background #151515
input.border #00000000
input.foreground #cccccc
input.placeholderForeground #a6a6a6
inputOption.activeBackground #FFFFFF1F
inputOption.activeBorder #fffbfb95
inputOption.activeForeground #F3F3F3
list.activeSelectionBackground #184971
list.activeSelectionForeground #ffffff
list.dropBackground #383b3d
list.focusBackground #062f4a
list.focusForeground #ffffff
list.highlightForeground #0097fb
list.hoverBackground #ffffff10
list.hoverForeground #ffffff
list.inactiveSelectionBackground #51729f
list.inactiveSelectionForeground #ffffff
listFilterWidget.background #25435f
listFilterWidget.noMatchesOutline #FF4F4F
listFilterWidget.outline #ba7e7e00
menu.background #303030
menu.border #00000085
menu.foreground #cccccc
menu.selectionBackground #094771
menu.selectionBorder #00000000
menu.selectionForeground #ffffff
menu.separatorBackground #bbbbbb
menubar.selectionBackground #FFFFFF21
menubar.selectionForeground #ffffff
merge.commonContentBackground #282828
merge.commonHeaderBackground #383838
merge.currentContentBackground #174841
merge.currentHeaderBackground #367366
merge.incomingContentBackground #28384B
merge.incomingHeaderBackground #395F8F
minimap.background #161c24
minimap.errorHighlight #ff5370
minimap.findMatchHighlight #f8e71c
minimap.selectionHighlight #25435f
minimap.warningHighlight #ffcb6b
minimapGutter.addedBackground #efbc6b
minimapGutter.deletedBackground #BF0F0F
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 #161c24
panel.border #f2f2f2
panelSection.border #80808059
panelTitle.activeBorder #00d8ff
panelTitle.activeForeground #ffffff
panelTitle.inactiveForeground #999999
peekView.border #6097b9
peekViewEditor.background #19283e
peekViewEditor.matchHighlightBackground #ff83362e
peekViewEditor.matchHighlightBorder #ff8336
peekViewEditorGutter.background #19283e
peekViewResult.background #0c0c0c87
peekViewResult.fileForeground #C5C5C5
peekViewResult.lineForeground #909090
peekViewResult.matchHighlightBackground #1D3450
peekViewResult.selectionBackground #1D3450
peekViewResult.selectionForeground #DADADA
peekViewTitle.background #1B1B1B
peekViewTitleDescription.foreground #6A6A6A
peekViewTitleLabel.foreground #C9C9C9
pickerGroup.border #3f3f46
pickerGroup.foreground #3794ff
progressBar.background #0e70c0
scrollbar.shadow #51729f
scrollbarSlider.activeBackground #ffffff20
scrollbarSlider.background #ffffff10
scrollbarSlider.hoverBackground #ffffff16
selection.background #256aa7
settings.focusedRowBackground #ffffff07
settings.headerForeground #CECECE
sideBar.background #151f2cd5
sideBar.border #9d9d9d
sideBar.dropBackground #383b3d
sideBar.foreground #cccccc
sideBarSectionHeader.background #25435f
sideBarSectionHeader.border #cccccc33
sideBarSectionHeader.foreground #ffffff
sideBarTitle.foreground #F7F7F7
statusBar.background #00d8ff
statusBar.debuggingBackground #cc6633
statusBar.debuggingForeground #ffffff
statusBar.foreground #000000
statusBar.noFolderBackground #00d8ff
statusBar.noFolderForeground #000000
statusBarItem.activeBackground #FFFFFF25
statusBarItem.hoverBackground #0108111f
statusBarItem.remoteBackground #00d8ff
statusBarItem.remoteForeground #000000
tab.activeBackground #ffffff10
tab.activeBorder #00000000
tab.activeBorderTop #00d8ff
tab.activeForeground #ffffff
tab.border #00000050
tab.hoverBackground #ffffff20
tab.inactiveBackground #161c24
tab.inactiveForeground #8a8a8aed
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 #FFFFFF
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 #C5C5C5
terminal.selectionBackground #4891ff41
terminalCursor.background #000000
terminalCursor.foreground #f2f2f2
textLink.foreground #3794ff
titleBar.activeBackground #161c24
titleBar.activeForeground #cccccc
titleBar.border #00000000
titleBar.inactiveBackground #3c3c3c99
titleBar.inactiveForeground #cccccc99
tree.indentGuidesStroke #ffffff20
walkThrough.embeddedEditorBackground #00000050
widget.shadow #00000080 storage.type.haskell #efbc6b —
support.variable.magic.python #f2f2f2 —
punctuation.separator.period.python,punctuation.separator.element.python,punctuation.parenthesis.begin.python,punctuation.parenthesis.end.python #f2f2f2 —
variable.parameter.function.language.special.self.python #00d8ff —
storage.modifier.lifetime.rust #f2f2f2 —
support.function.std.rust #ff8336 —
entity.name.lifetime.rust #00d8ff —
variable.language.rust #f2f2f2 —
support.constant.edge #cab0ff —
constant.other.character-class.regexp #f2f2f2 —
keyword.operator.quantifier.regexp #efbc6b —
punctuation.definition.string.begin,punctuation.definition.string.end #C3E88D —
variable.parameter.function #f2f2f2 —
comment markup.link #7f848e —
markup.changed.diff #00d8ff —
meta.diff.header.from-file,meta.diff.header.to-file,punctuation.definition.from-file.diff,punctuation.definition.to-file.diff #ff8336 —
markup.inserted.diff #C3E88D —
markup.deleted.diff #f2f2f2 —
meta.function.c,meta.function.cpp #f2f2f2 —
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 #f2f2f2 —
punctuation.separator.key-value #f2f2f2 —
keyword.operator.expression.import #ff8336 —
support.constant.math #00d8ff —
support.constant.property.math #efbc6b —
variable.other.constant #6097b9 —
storage.type.annotation.java, storage.type.object.array.java #00d8ff —
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 #f2f2f2 —
storage.modifier.import.java,storage.type.java,storage.type.generic.java #00d8ff —
keyword.operator.instanceof.java #cab0ff —
meta.definition.variable.name.java #f2f2f2 —
keyword.operator.logical #f2f2f2 —
keyword.operator.bitwise #f2f2f2 —
keyword.operator.channel #f2f2f2 —
support.constant.property-value.scss,support.constant.property-value.css #efbc6b —
keyword.operator.css,keyword.operator.scss,keyword.operator.less #f2f2f2 —
support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss #efbc6b —
punctuation.separator.list.comma.css #f2f2f2 —
support.constant.color.w3c-standard-color-name.css #efbc6b —
support.type.vendored.property-name.css #f2f2f2 —
support.module.node,support.type.object.module,support.module.node #00d8ff —
entity.name.type.module #00d8ff —
variable.other.readwrite,meta.object-literal.key,support.variable.property,support.variable.object.process,support.variable.object.node #A9B7C6 —
support.constant.json #efbc6b —
keyword.operator.expression.instanceof, keyword.operator.new, keyword.operator.ternary, keyword.operator.optional, keyword.operator.expression.keyof #cab0ff —
support.type.object.console #f2f2f2 —
support.variable.property.process #efbc6b —
entity.name.function,support.function.console #ff8336 —
keyword.operator.misc.rust #f2f2f2 —
keyword.operator.sigil.rust #cab0ff —
keyword.operator.delete #cab0ff —
support.type.object.dom #f2f2f2 —
support.variable.dom,support.variable.property.dom #f2f2f2 —
keyword.operator.arithmetic,keyword.operator.comparison,keyword.operator.decrement,keyword.operator.increment,keyword.operator.relational #f2f2f2 —
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 #cab0ff —
punctuation.separator.delimiter #f2f2f2 —
punctuation.separator.c,punctuation.separator.cpp #cab0ff —
support.type.posix-reserved.c,support.type.posix-reserved.cpp #f2f2f2 —
keyword.operator.sizeof.c,keyword.operator.sizeof.cpp #cab0ff —
variable.parameter.function.language.python #efbc6b —
support.type.python #f2f2f2 —
keyword.operator.logical.python #cab0ff —
variable.parameter.function.python #efbc6b —
punctuation.definition.arguments.begin.python,punctuation.definition.arguments.end.python,punctuation.separator.arguments.python,punctuation.definition.list.begin.python,punctuation.definition.list.end.python #f2f2f2 —
meta.function-call.generic.python #ff8336 —
constant.character.format.placeholder.other.python #efbc6b —
keyword.operator.assignment.compound #cab0ff —
keyword.operator.assignment.compound.js,keyword.operator.assignment.compound.ts #f2f2f2 —
entity.name.namespace #00d8ff —
variable.language #00d8ff —
token.variable.parameter.java #f2f2f2 —
import.storage.java #00d8ff —
token.package.keyword #cab0ff —
entity.name.function, meta.require, support.function.any-method, variable.function #00d8ff —
entity.name.type.namespace #00d8ff —
support.class, entity.name.type.class #ff8336 —
entity.name.class.identifier.namespace.type #00d8ff —
entity.name.class, variable.other.class.js, variable.other.class.ts #00d8ff —
variable.other.class.php #f2f2f2 —
control.elements, keyword.operator.less #efbc6b —
keyword.other.special-method #ff8336 —
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 #cab0ff —
token.storage.type.java #00d8ff —
support.type.property-name #80CBC4 —
support.constant.property-value #f2f2f2 —
support.constant.font-name #efbc6b —
entity.other.inherited-class #00d8ff —
constant.other.symbol #f2f2f2 —
punctuation.definition.constant #efbc6b —
entity.other.attribute-name #efbc6b —
entity.other.attribute-name.id #ff8336 normal
entity.other.attribute-name.class.css #ff8336 normal
markup.heading punctuation.definition.heading, entity.name.section #ff8336 —
keyword.other.unit #efbc6b —
markup.bold,todo.bold #efbc6b —
punctuation.definition.bold #00d8ff —
markup.italic, punctuation.definition.italic,todo.emphasis #cab0ff —
entity.name.section.markdown #f2f2f2 —
punctuation.definition.heading.markdown #f2f2f2 —
punctuation.definition.list.begin.markdown #f2f2f2 —
markup.heading.setext #f2f2f2 —
punctuation.definition.bold.markdown #efbc6b —
markup.inline.raw.markdown #C3E88D —
markup.inline.raw.string.markdown #C3E88D —
punctuation.definition.list.markdown #f2f2f2 —
punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown #f2f2f2 —
beginning.punctuation.definition.list.markdown #f2f2f2 —
punctuation.definition.metadata.markdown #f2f2f2 —
markup.underline.link.markdown,markup.underline.link.image.markdown #cab0ff —
string.other.link.title.markdown,string.other.link.description.markdown #ff8336 —
constant.character.escape #f2f2f2 —
punctuation.section.embedded, variable.interpolation #f2f2f2 —
punctuation.section.embedded.begin,punctuation.section.embedded.end #cab0ff —
invalid.illegal.bad-ampersand.html #f2f2f2 —
invalid.deprecated #ffffff —
invalid.unimplemented #ffffff —
source.json meta.structure.dictionary.json > string.quoted.json #f2f2f2 —
source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string #f2f2f2 —
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 #C3E88D —
source.json meta.structure.dictionary.json > constant.language.json,source.json meta.structure.array.json > constant.language.json #f2f2f2 —
support.type.property-name.json #f2f2f2 —
support.type.property-name.json punctuation #f2f2f2 —
text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade #cab0ff —
text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade #cab0ff —
support.other.namespace.use.php,support.other.namespace.use-as.php,support.other.namespace.php,entity.other.alias.php,meta.interface.php #00d8ff —
keyword.operator.error-control.php #cab0ff —
keyword.operator.type.php #cab0ff —
punctuation.section.array.begin.php #f2f2f2 —
punctuation.section.array.end.php #f2f2f2 —
invalid.illegal.non-null-typehinted.php #f44747 —
storage.type.php,meta.other.type.phpdoc.php,keyword.other.type.php,keyword.other.array.phpdoc.php #00d8ff —
meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php #ff8336 —
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 #f2f2f2 —
support.constant.core.rust #efbc6b —
support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php #efbc6b —
entity.name.goto-label.php,support.other.php #ff8336 —
keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php #f2f2f2 —
keyword.operator.regexp.php #cab0ff —
keyword.operator.comparison.php #f2f2f2 —
keyword.operator.heredoc.php,keyword.operator.nowdoc.php #cab0ff —
meta.function.decorator.python #ff8336 —
support.token.decorator.python,meta.function.decorator.identifier.python #f2f2f2 —
function.parameter #f2f2f2 —
function.parameter.ruby, function.parameter.cs #f2f2f2 —
constant.language.symbol.ruby #f2f2f2 —
inline-color-decoration rgb-value #efbc6b —
support.type.primitive.ts,support.type.builtin.ts,support.type.primitive.tsx,support.type.builtin.tsx #00d8ff —
block.scope.end,block.scope.begin #f2f2f2 —
entity.name.variable.local.cs #f2f2f2 —
token.error-token #f44747 —
token.debug-token #cab0ff —
punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded #cab0ff —
meta.template.expression #f2f2f2 —
keyword.operator.module #cab0ff —
support.type.type.flowtype #ff8336 —
support.type.primitive #00d8ff —
meta.property.object #f2f2f2 —
variable.parameter.function.js #f2f2f2 —
keyword.other.template.begin #C3E88D —
keyword.other.template.end #C3E88D —
keyword.other.substitution.begin #C3E88D —
keyword.other.substitution.end #C3E88D —
keyword.operator.assignment #f2f2f2 —
keyword.operator.assignment.go #00d8ff —
keyword.operator.arithmetic.go, keyword.operator.address.go #cab0ff —
entity.name.package.go #00d8ff —
support.type.prelude.elm #f2f2f2 —
support.constant.elm #efbc6b —
punctuation.quasi.element #cab0ff —
constant.character.entity #f2f2f2 —
entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class #f2f2f2 —
entity.global.clojure #00d8ff —
meta.symbol.clojure #f2f2f2 —
constant.keyword.clojure #f2f2f2 —
meta.arguments.coffee, variable.parameter.function.coffee #f2f2f2 —
meta.scope.prerequisites.makefile #f2f2f2 —
storage.modifier.import.groovy #00d8ff —
meta.method.groovy #ff8336 —
meta.definition.variable.name.groovy #f2f2f2 —
meta.definition.class.inherited.classes.groovy #C3E88D —
support.variable.semantic.hlsl #00d8ff —
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 #cab0ff —
text.variable, text.bracketed #f2f2f2 —
support.type.swift, support.type.vb.asp #00d8ff —
entity.name.function.xi #00d8ff —
entity.name.class.xi #f2f2f2 —
constant.character.character-class.regexp.xi #f2f2f2 —
constant.regexp.xi #cab0ff —
keyword.control.xi #f2f2f2 —
beginning.punctuation.definition.quote.markdown.xi #C3E88D —
beginning.punctuation.definition.list.markdown.xi #7f848e —
constant.character.xi #ff8336 —
constant.other.color.rgb-value.xi #ffffff —
punctuation.definition.tag.xi #7f848e —
entity.name.label.cs, entity.name.scope-resolution.function.call, entity.name.scope-resolution.function.definition #00d8ff —
entity.name.label.cs, markup.heading.setext.1.markdown, markup.heading.setext.2.markdown #f2f2f2 —
meta.brace.square #f2f2f2 —
comment, punctuation.definition.comment #7f848e italic
markup.quote.markdown #7f848e —
punctuation.definition.block.sequence.item.yaml #f2f2f2 —
constant.language.symbol.elixir #f2f2f2 —
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 #efbc6b 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 } !` ;
}
Photon Racer | Coding Theme