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 #003049 activityBar.foreground #00f5d4 activityBar.inactiveForeground #ffffff6e 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 #fb8b24 — variable.other.generic-type.haskell #00f5d4 — storage.type.haskell #affc41 — support.variable.magic.python
Shiki preview TypeScript sample highlighted with this variant's colors and tokenColors.
badge.foreground
#ffffff
breadcrumb.activeSelectionForeground #e0e0e0
breadcrumb.background #14213d
breadcrumb.focusForeground #e0e0e0
breadcrumb.foreground #cccccccc
button.background #009d74
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 #474747
diffEditor.border #444444
diffEditor.insertedTextBackground #9bb95533
diffEditor.removedTextBackground #ff000033
dropdown.background #3c3c3c
dropdown.border #00000000
dropdown.foreground #cccccc
editor.background #003049
editor.findMatchBackground #00f5d452
editor.findMatchBorder #74879f
editor.findMatchHighlightBackground #ea5c0055
editor.findMatchHighlightBorder #ffffff00
editor.findRangeHighlightBackground #3a3d4166
editor.findRangeHighlightBorder #ffffff00
editor.foldBackground #264f784d
editor.foreground #90e0ef
editor.hoverHighlightBackground #264f7840
editor.inactiveSelectionBackground #3a3d41
editor.lineHighlightBackground #ffffff0A
editor.lineHighlightBorder #00839f
editor.rangeHighlightBackground #ffffff0b
editor.rangeHighlightBorder #ffffff00
editor.selectionBackground #264f78
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 #80ed99
editorError.background #B73A3400
editorError.border #ffffff00
editorError.foreground #f48771
editorGroup.border #444444
editorGroup.emptyBackground #003049
editorGroupHeader.tabsBackground #023047
editorGroupHeader.tabsBorder #00f5d44a
editorGutter.addedBackground #587c0c
editorGutter.background #14213d
editorGutter.commentRangeForeground #c5c5c5
editorGutter.deletedBackground #94151b
editorGutter.foldingControlForeground #c5c5c5
editorGutter.modifiedBackground #0c7d9d
editorHoverWidget.background #252526
editorHoverWidget.border #454545
editorHoverWidget.foreground #cccccc
editorIndentGuide.activeBackground #00f5d452
editorIndentGuide.background #00f5d452
editorInfo.background #4490BF00
editorInfo.border #4490BF00
editorInfo.foreground #75beff
editorLineNumber.activeForeground #fee440
editorLineNumber.foreground #90e0ef
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 #00f5d4
foreground #00f5d4
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 #00f5d4
input.background #3c3c3c
input.border #00000000
input.foreground #cccccc
input.placeholderForeground #a6a6a6
inputOption.activeBackground #007fd466
inputOption.activeBorder #007acc00
inputOption.activeForeground #ffffff
list.activeSelectionBackground #00f5d47e
list.activeSelectionForeground #ffffff
list.dropBackground #383b3d
list.focusBackground #062f4a
list.focusForeground #cccccc
list.highlightForeground #0097fb
list.hoverBackground #fb5607a1
list.hoverForeground #cccccc
list.inactiveSelectionBackground #fb56073a
list.inactiveSelectionForeground #cccccc
listFilterWidget.background #653723
listFilterWidget.noMatchesOutline #be1100
listFilterWidget.outline #00000000
menu.background #14213d
menu.border #00000085
menu.foreground #caf0f8
menu.selectionBackground #094771
menu.selectionBorder #00000000
menu.selectionForeground #caf0f8
menu.separatorBackground #bbbbbb
menubar.selectionBackground #ffffff1a
menubar.selectionForeground #ffffff
merge.commonContentBackground #282828
merge.commonHeaderBackground #383838
merge.currentContentBackground #27403B
merge.currentHeaderBackground #367366
merge.incomingContentBackground #28384B
merge.incomingHeaderBackground #395F8F
minimap.background #003049
minimap.errorHighlight #f48771
minimap.findMatchHighlight #00f5d452
minimap.selectionHighlight #264f78
minimap.warningHighlight #cca700
minimapGutter.addedBackground #587c0c
minimapGutter.deletedBackground #94151b
minimapGutter.modifiedBackground #0c7d9d
notificationCenter.border #474747
notificationCenterHeader.background #303031
notificationCenterHeader.foreground #cccccc
notifications.background #14213d
notifications.border #303031
notifications.foreground #cccccc
notificationsErrorIcon.foreground #f48771
notificationsInfoIcon.foreground #75beff
notificationsWarningIcon.foreground #cca700
notificationToast.border #474747
panel.background #003049
panel.border #808080
panelSection.border #80808059
panelTitle.activeBorder #e7e7e7
panelTitle.activeForeground #e7e7e7
panelTitle.inactiveForeground #e7e7e795
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 #3794ff
progressBar.background #00f5d4
scrollbar.shadow #000000
scrollbarSlider.activeBackground #a8dadc20
scrollbarSlider.background #a8dadcbb
scrollbarSlider.hoverBackground #a8dadc5e
selection.background #256aa7
settings.focusedRowBackground #ffffff07
settings.headerForeground #00f5d4
sideBar.background #00304978
sideBar.dropBackground #383b3d
sideBar.foreground #cce3de
sideBarSectionHeader.background #00000052
sideBarSectionHeader.border #cccccc44
sideBarSectionHeader.foreground #cccccc
sideBarTitle.foreground #cce3de
statusBar.background #00716c
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 #0f4c5c
tab.activeBorder #00000000
tab.activeBorderTop #00000000
tab.activeForeground #caf0f8
tab.border #00f5d44a
tab.hoverBackground #3c6e71
tab.inactiveBackground #3a5a4058
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 #00716c
titleBar.activeForeground #ffffff
titleBar.border #00000000
titleBar.inactiveBackground #3c3c3c99
titleBar.inactiveForeground #cccccc99
tree.indentGuidesStroke #585858
walkThrough.embeddedEditorBackground #00000050
widget.shadow #0000005c #fb8b24
punctuation.separator.period.python,punctuation.separator.element.python,punctuation.parenthesis.begin.python,punctuation.parenthesis.end.python #90e0ef —
variable.parameter.function.language.special.self.python #ff3e91 —
storage.modifier.lifetime.rust #90e0ef —
support.function.std.rust #00a6ff —
entity.name.lifetime.rust #ff3e91 —
variable.language.rust #fb8b24 —
support.constant.edge #00f5d4 —
constant.other.character-class.regexp #fb8b24 —
keyword.operator.quantifier.regexp #affc41 —
punctuation.definition.string.begin,punctuation.definition.string.end #ffca3a —
variable.parameter.function #90e0ef —
comment markup.link #7f848e —
markup.changed.diff #ff3e91 —
meta.diff.header.from-file,meta.diff.header.to-file,punctuation.definition.from-file.diff,punctuation.definition.to-file.diff #00a6ff —
markup.inserted.diff #ffca3a —
markup.deleted.diff #fb8b24 —
meta.function.c,meta.function.cpp #fb8b24 —
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 #90e0ef —
punctuation.separator.key-value #90e0ef —
keyword.operator.expression.import #00a6ff —
support.constant.math #ff3e91 —
support.constant.property.math #affc41 —
variable.other.constant #ff3e91 —
storage.type.annotation.java, storage.type.object.array.java #ff3e91 —
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 #90e0ef —
storage.modifier.import.java,storage.type.java,storage.type.generic.java #ff3e91 —
keyword.operator.instanceof.java #00f5d4 —
meta.definition.variable.name.java #fb8b24 —
keyword.operator.logical #00f5d4 —
keyword.operator.bitwise #00f5d4 —
keyword.operator.channel #00f5d4 —
support.constant.property-value.scss,support.constant.property-value.css #affc41 —
keyword.operator.css,keyword.operator.scss,keyword.operator.less #00f5d4 —
support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss #affc41 —
punctuation.separator.list.comma.css #90e0ef —
support.constant.color.w3c-standard-color-name.css #affc41 —
support.type.vendored.property-name.css #00f5d4 —
support.module.node,support.type.object.module,support.module.node #ff3e91 —
entity.name.type.module #ff3e91 —
variable.other.readwrite,meta.object-literal.key,support.variable.property,support.variable.object.process,support.variable.object.node #fb8b24 —
support.constant.json #affc41 —
keyword.operator.expression.instanceof, keyword.operator.new, keyword.operator.ternary, keyword.operator.optional, keyword.operator.expression.keyof #00f5d4 —
support.type.object.console #fb8b24 —
support.variable.property.process #affc41 —
entity.name.function,support.function.console #00a6ff —
keyword.operator.misc.rust #90e0ef —
keyword.operator.sigil.rust #00f5d4 —
keyword.operator.delete #00f5d4 —
support.type.object.dom #00f5d4 —
support.variable.dom,support.variable.property.dom #fb8b24 —
keyword.operator.arithmetic,keyword.operator.comparison,keyword.operator.decrement,keyword.operator.increment,keyword.operator.relational #00f5d4 —
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 #00f5d4 —
punctuation.separator.delimiter #90e0ef —
punctuation.separator.c,punctuation.separator.cpp #00f5d4 —
support.type.posix-reserved.c,support.type.posix-reserved.cpp #00f5d4 —
keyword.operator.sizeof.c,keyword.operator.sizeof.cpp #00f5d4 —
variable.parameter.function.language.python #affc41 —
support.type.python #00f5d4 —
keyword.operator.logical.python #00f5d4 —
variable.parameter.function.python #affc41 —
punctuation.definition.arguments.begin.python,punctuation.definition.arguments.end.python,punctuation.separator.arguments.python,punctuation.definition.list.begin.python,punctuation.definition.list.end.python #90e0ef —
meta.function-call.generic.python #00a6ff —
constant.character.format.placeholder.other.python #affc41 —
keyword.operator.assignment.compound #00f5d4 —
keyword.operator.assignment.compound.js,keyword.operator.assignment.compound.ts #00f5d4 —
entity.name.namespace #ff3e91 —
variable.language #ff3e91 —
token.variable.parameter.java #90e0ef —
import.storage.java #ff3e91 —
token.package.keyword #00f5d4 —
entity.name.function, meta.require, support.function.any-method, variable.function #00a6ff —
entity.name.type.namespace #ff3e91 —
support.class, entity.name.type.class #ff3e91 —
entity.name.class.identifier.namespace.type #ff3e91 —
entity.name.class, variable.other.class.js, variable.other.class.ts #ff3e91 —
variable.other.class.php #fb8b24 —
control.elements, keyword.operator.less #affc41 —
keyword.other.special-method #00a6ff —
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 #00f5d4 —
token.storage.type.java #ff3e91 —
support.type.property-name #90e0ef —
support.constant.property-value #90e0ef —
support.constant.font-name #affc41 —
entity.other.inherited-class #ff3e91 —
constant.other.symbol #00f5d4 —
punctuation.definition.constant #affc41 —
entity.other.attribute-name #affc41 —
entity.other.attribute-name.id #00a6ff normal
entity.other.attribute-name.class.css #affc41 normal
markup.heading punctuation.definition.heading, entity.name.section #00a6ff —
keyword.other.unit #fb8b24 —
markup.bold,todo.bold #affc41 —
punctuation.definition.bold #ff3e91 —
markup.italic, punctuation.definition.italic,todo.emphasis #00f5d4 —
entity.name.section.markdown #fb8b24 —
punctuation.definition.heading.markdown #fb8b24 —
punctuation.definition.list.begin.markdown #fb8b24 —
markup.heading.setext #90e0ef —
punctuation.definition.bold.markdown #affc41 —
markup.inline.raw.markdown #ffca3a —
markup.inline.raw.string.markdown #ffca3a —
punctuation.definition.list.markdown #fb8b24 —
punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown #fb8b24 —
beginning.punctuation.definition.list.markdown #fb8b24 —
punctuation.definition.metadata.markdown #fb8b24 —
markup.underline.link.markdown,markup.underline.link.image.markdown #00f5d4 —
string.other.link.title.markdown,string.other.link.description.markdown #00a6ff —
constant.character.escape #00f5d4 —
punctuation.section.embedded, variable.interpolation #fb8b24 —
punctuation.section.embedded.begin,punctuation.section.embedded.end #00f5d4 —
invalid.illegal.bad-ampersand.html #90e0ef —
invalid.deprecated #ffffff —
invalid.unimplemented #ffffff —
source.json meta.structure.dictionary.json > string.quoted.json #fb8b24 —
source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string #fb8b24 —
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 #ffca3a —
source.json meta.structure.dictionary.json > constant.language.json,source.json meta.structure.array.json > constant.language.json #00f5d4 —
support.type.property-name.json #fb8b24 —
support.type.property-name.json punctuation #fb8b24 —
text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade #00f5d4 —
text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade #00f5d4 —
support.other.namespace.use.php,support.other.namespace.use-as.php,support.other.namespace.php,entity.other.alias.php,meta.interface.php #ff3e91 —
keyword.operator.error-control.php #00f5d4 —
keyword.operator.type.php #00f5d4 —
punctuation.section.array.begin.php #90e0ef —
punctuation.section.array.end.php #90e0ef —
invalid.illegal.non-null-typehinted.php #f44747 —
storage.type.php,meta.other.type.phpdoc.php,keyword.other.type.php,keyword.other.array.phpdoc.php #ff3e91 —
meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php #00a6ff —
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 #90e0ef —
support.constant.core.rust #affc41 —
support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php #affc41 —
entity.name.goto-label.php,support.other.php #00a6ff —
keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php #00f5d4 —
keyword.operator.regexp.php #00f5d4 —
keyword.operator.comparison.php #00f5d4 —
keyword.operator.heredoc.php,keyword.operator.nowdoc.php #00f5d4 —
meta.function.decorator.python #00a6ff —
support.token.decorator.python,meta.function.decorator.identifier.python #00f5d4 —
function.parameter #90e0ef —
function.parameter.ruby, function.parameter.cs #90e0ef —
constant.language.symbol.ruby #00f5d4 —
inline-color-decoration rgb-value #affc41 —
support.type.primitive.ts,support.type.builtin.ts,support.type.primitive.tsx,support.type.builtin.tsx #ff3e91 —
block.scope.end,block.scope.begin #90e0ef —
entity.name.variable.local.cs #fb8b24 —
token.error-token #f44747 —
token.debug-token #00f5d4 —
punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded #00f5d4 —
meta.template.expression #90e0ef —
keyword.operator.module #00f5d4 —
support.type.type.flowtype #00a6ff —
support.type.primitive #ff3e91 —
meta.property.object #fb8b24 —
variable.parameter.function.js #fb8b24 —
keyword.other.template.begin #ffca3a —
keyword.other.template.end #ffca3a —
keyword.other.substitution.begin #ffca3a —
keyword.other.substitution.end #ffca3a —
keyword.operator.assignment #00f5d4 —
keyword.operator.assignment.go #ff3e91 —
keyword.operator.arithmetic.go, keyword.operator.address.go #00f5d4 —
entity.name.package.go #ff3e91 —
support.type.prelude.elm #00f5d4 —
support.constant.elm #affc41 —
punctuation.quasi.element #00f5d4 —
constant.character.entity #fb8b24 —
entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class #00f5d4 —
entity.global.clojure #ff3e91 —
meta.symbol.clojure #fb8b24 —
constant.keyword.clojure #00f5d4 —
meta.arguments.coffee, variable.parameter.function.coffee #fb8b24 —
meta.scope.prerequisites.makefile #fb8b24 —
storage.modifier.import.groovy #ff3e91 —
meta.method.groovy #00a6ff —
meta.definition.variable.name.groovy #fb8b24 —
meta.definition.class.inherited.classes.groovy #ffca3a —
support.variable.semantic.hlsl #ff3e91 —
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 #00f5d4 —
text.variable, text.bracketed #fb8b24 —
support.type.swift, support.type.vb.asp #ff3e91 —
entity.name.function.xi #ff3e91 —
entity.name.class.xi #00f5d4 —
constant.character.character-class.regexp.xi #fb8b24 —
constant.regexp.xi #00f5d4 —
keyword.control.xi #00f5d4 —
beginning.punctuation.definition.quote.markdown.xi #ffca3a —
beginning.punctuation.definition.list.markdown.xi #7f848e —
constant.character.xi #00a6ff —
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 #ff3e91 —
entity.name.label.cs, markup.heading.setext.1.markdown, markup.heading.setext.2.markdown #fb8b24 —
meta.brace.square #90e0ef —
comment, punctuation.definition.comment #7f848e italic
markup.quote.markdown #7f848e —
punctuation.definition.block.sequence.item.yaml #90e0ef —
constant.language.symbol.elixir #00f5d4 —
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 } !` ;
}
Pop | Coding Theme