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 #141314 activityBar.border #32302d activityBar.foreground #8a745c activityBar.inactiveForeground #94949466 activityBarBadge.background #917154 activityBarBadge.foreground #ffffff 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 #916255 — variable.other.generic-type.haskell #543b3b — storage.type.haskell #ad8650 — support.variable.magic.python
Shiki preview TypeScript sample highlighted with this variant's colors and tokenColors.
badge.background
#9c7650
badge.foreground #ffffff
breadcrumb.activeSelectionForeground #e0e0e0
breadcrumb.background #141314
breadcrumb.focusForeground #e0e0e0
breadcrumb.foreground #777777cc
button.background #473e38
button.foreground #ffffff
button.hoverBackground #75715e
button.secondaryBackground #3a3d41
button.secondaryForeground #ffffff
button.secondaryHoverBackground #45494e
checkbox.background #3c3c3c
checkbox.border #32302d
checkbox.foreground #cccccc
debugExceptionWidget.background #141314
debugExceptionWidget.border #474747
debugToolBar.background #141314
debugToolBar.border #474747
diffEditor.border #444444
diffEditor.insertedTextBackground #9bb95533
diffEditor.removedTextBackground #ff000033
dropdown.background #3c3c3c
dropdown.border #32302d
dropdown.foreground #cccccc
editor.background #141314
editor.findMatchBackground #414a56
editor.findMatchBorder #74879f
editor.findMatchHighlightBackground #ea5c0055
editor.findMatchHighlightBorder #ffffff00
editor.findRangeHighlightBackground #3a3d4166
editor.findRangeHighlightBorder #ffffff00
editor.foldBackground #264f784d
editor.foreground #8a745c
editor.hoverHighlightBackground #264f7840
editor.inactiveSelectionBackground #252628
editor.lineHighlightBackground #ffffff0A
editor.lineHighlightBorder #282828
editor.rangeHighlightBackground #ffffff0b
editor.rangeHighlightBorder #ffffff00
editor.selectionBackground #1c232a
editor.selectionHighlightBackground #add6ff26
editor.selectionHighlightBorder #4b5e73
editor.wordHighlightBackground #575757b8
editor.wordHighlightStrongBackground #004972b8
editorBracketHighlight.foreground1 #5e6f75
editorBracketHighlight.foreground2 #ad8650
editorBracketHighlight.foreground3 #ea5c004d
editorBracketHighlight.foreground4 #4b5e73
editorBracketHighlight.foreground5 #858167
editorBracketHighlight.foreground6 #858167
editorBracketHighlight.unexpectedBracket.foreground #916255
editorBracketMatch.background #0064001a
editorBracketMatch.border #888888
editorCodeLens.foreground #999999
editorCursor.background #000000
editorCursor.foreground #aeafad
editorError.background #B73A3400
editorError.border #ffffff00
editorError.foreground #916255
editorGroup.border #444444
editorGroup.emptyBackground #141314
editorGroupHeader.tabsBackground #141314
editorGroupHeader.tabsBorder #32302d
editorGutter.addedBackground #858167
editorGutter.background #141314
editorGutter.commentRangeForeground #969696
editorGutter.deletedBackground #916255
editorGutter.foldingControlForeground #969696
editorGutter.modifiedBackground #5e6f75
editorHoverWidget.background #141314
editorHoverWidget.border #454545
editorHoverWidget.foreground #8a8a8a
editorIndentGuide.activeBackground #707070
editorIndentGuide.background #404040
editorInfo.background #4490BF00
editorInfo.border #4490BF00
editorInfo.foreground #75715e
editorLineNumber.activeForeground #cdbba8
editorLineNumber.foreground #5e5a56
editorLink.activeForeground #6b685e
editorMarkerNavigation.background #2d2d30
editorMarkerNavigationError.background #916255
editorMarkerNavigationInfo.background #75715e
editorMarkerNavigationWarning.background #ad8650
editorOverviewRuler.background #25252500
editorOverviewRuler.border #7f7f7f4d
editorRuler.foreground #5a5a5a
editorSuggestWidget.background #141314
editorSuggestWidget.border #454545
editorSuggestWidget.foreground #d4d4d4
editorSuggestWidget.highlightForeground #75715e
editorSuggestWidget.selectedBackground #2b3841
editorWarning.background #A9904000
editorWarning.border #ffffff00
editorWarning.foreground #ad8650
editorWhitespace.foreground #e3e4e229
editorWidget.background #141314
editorWidget.foreground #cccccc
editorWidget.resizeBorder #5F5F5F
focusBorder #9a875f
foreground #8a745c
gitDecoration.addedResourceForeground #858167
gitDecoration.conflictingResourceForeground #543b3b
gitDecoration.deletedResourceForeground #70473a
gitDecoration.ignoredResourceForeground #8c8c8c
gitDecoration.modifiedResourceForeground #9c7650
gitDecoration.stageDeletedResourceForeground #70473a
gitDecoration.stageModifiedResourceForeground #9c7650
gitDecoration.submoduleResourceForeground #75715e
gitDecoration.untrackedResourceForeground #858167
icon.foreground #8a745c
input.background #3c3c3c
input.border #32302d
input.foreground #cccccc
input.placeholderForeground #a6a6a6
inputOption.activeBackground #007fd466
inputOption.activeBorder #007acc00
inputOption.activeForeground #ffffff
list.activeSelectionBackground #212121
list.activeSelectionForeground #b6b6b6
list.dropBackground #212121
list.focusBackground #473e38
list.focusForeground #cccccc
list.highlightForeground #75715e
list.hoverBackground #2a2d2e
list.hoverForeground #a9a9a9
list.inactiveSelectionBackground #37373d
list.inactiveSelectionForeground #a3a3a3
listFilterWidget.background #3f3829
listFilterWidget.noMatchesOutline #70473a
listFilterWidget.outline #00000000
menu.background #141314
menu.border #00000085
menu.foreground #8a745c
menu.selectionBackground #282828
menu.selectionBorder #32302d
menu.selectionForeground #a7a7a7
menu.separatorBackground #bbbbbb
menubar.selectionBackground #ffffff1a
menubar.selectionBorder #32302d
menubar.selectionForeground #8a745c
merge.commonContentBackground #282828
merge.commonHeaderBackground #383838
merge.currentContentBackground #27403B
merge.currentHeaderBackground #367366
merge.incomingContentBackground #28384B
merge.incomingHeaderBackground #395F8F
minimap.background #141314
minimap.errorHighlight #916255
minimap.findMatchHighlight #414a56
minimap.selectionHighlight #1c232a
minimap.warningHighlight #ad8650
minimapGutter.addedBackground #858167
minimapGutter.deletedBackground #916255
minimapGutter.modifiedBackground #5e6f75
notificationCenter.border #474747
notificationCenterHeader.background #303031
notificationCenterHeader.foreground #cccccc
notifications.background #141314
notifications.border #303031
notifications.foreground #8a745c
notificationsErrorIcon.foreground #916255
notificationsInfoIcon.foreground #75715e
notificationsWarningIcon.foreground #ad8650
notificationToast.border #32302d
panel.background #141314
panel.border #80808059
panelSection.border #80808059
panelTitle.activeBorder #e7e7e7
panelTitle.activeForeground #e7e7e7
panelTitle.inactiveForeground #e7e7e799
peekView.border #007acc
peekViewEditor.background #001f33
peekViewEditor.matchHighlightBackground #ff8f0099
peekViewEditor.matchHighlightBorder #ee931e
peekViewEditorGutter.background #001f33
peekViewResult.background #252526
peekViewResult.fileForeground #ffffff
peekViewResult.lineForeground #bbbbbb
peekViewResult.matchHighlightBackground #ea5c004d
peekViewResult.selectionBackground #3399ff33
peekViewResult.selectionForeground #ffffff
peekViewTitle.background #1e1e1e
peekViewTitleDescription.foreground #ccccccb3
peekViewTitleLabel.foreground #ffffff
pickerGroup.border #32302d
pickerGroup.foreground #8a745c
progressBar.background #917154
scrollbar.shadow #000000
scrollbarSlider.activeBackground #bfbfbf66
scrollbarSlider.background #79797966
scrollbarSlider.hoverBackground #646464b3
selection.background #9c7650
settings.focusedRowBackground #ffffff07
settings.headerForeground #8a745c
sideBar.background #141314
sideBar.border #32302d
sideBar.dropBackground #212121
sideBar.foreground #8a745c
sideBarSectionHeader.background #00000000
sideBarSectionHeader.border #cccccc33
sideBarSectionHeader.foreground #7b7b7b
sideBarTitle.foreground #bbbbbb
statusBar.background #141314
statusBar.border #32302d
statusBar.debuggingBackground #9c7650
statusBar.debuggingForeground #e0e0e0
statusBar.foreground #8a745c
statusBar.noFolderBackground #543b3b
statusBar.noFolderForeground #a3a3a3
statusBarItem.activeBackground #FFFFFF25
statusBarItem.hoverBackground #ffffff1f
statusBarItem.remoteBackground #534d35
statusBarItem.remoteForeground #bcbcbc
tab.activeBackground #141314
tab.activeBorder #8a745c
tab.activeBorderTop #383734
tab.activeForeground #8a745c
tab.border #32302d
tab.hoverBorder #32302d
tab.inactiveBackground #141314
tab.inactiveForeground #73737380
terminal.ansiBlack #46423b
terminal.ansiBlue #75715e
terminal.ansiBrightBlack #666666
terminal.ansiBrightBlue #473e38
terminal.ansiBrightCyan #585858
terminal.ansiBrightGreen #858167
terminal.ansiBrightMagenta #6b5d51
terminal.ansiBrightRed #916255
terminal.ansiBrightWhite #e5e5e5
terminal.ansiBrightYellow #ad8650
terminal.ansiCyan #5f4444
terminal.ansiGreen #534d35
terminal.ansiMagenta #543b3b
terminal.ansiRed #70473a
terminal.ansiWhite #e5e5e5
terminal.ansiYellow #9c7650
terminal.border #80808059
terminal.foreground #8a745c
terminal.selectionBackground #ffffff40
terminalCursor.background #9c7650
terminalCursor.foreground #8a745c
textLink.foreground #916255
titleBar.activeBackground #141314
titleBar.activeForeground #7b7b7b
titleBar.border #32302d
titleBar.inactiveBackground #3c3c3c99
titleBar.inactiveForeground #cccccc99
tree.indentGuidesStroke #343434
walkThrough.embeddedEditorBackground #00000050
widget.shadow #0000005c #916255
punctuation.separator.period.python,punctuation.separator.element.python,punctuation.parenthesis.begin.python,punctuation.parenthesis.end.python #8a745c —
variable.parameter.function.language.special.self.python #9c7650 —
storage.modifier.lifetime.rust #8a745c —
support.function.std.rust #75715e —
entity.name.lifetime.rust #9c7650 —
variable.language.rust #916255 —
support.constant.edge #543b3b —
constant.other.character-class.regexp #916255 —
keyword.operator.quantifier.regexp #ad8650 —
punctuation.definition.string.begin,punctuation.definition.string.end #858167 —
variable.parameter.function #8a745c —
comment markup.link #3f4041 —
markup.changed.diff #9c7650 —
meta.diff.header.from-file,meta.diff.header.to-file,punctuation.definition.from-file.diff,punctuation.definition.to-file.diff #75715e —
markup.inserted.diff #858167 —
markup.deleted.diff #916255 —
meta.function.c,meta.function.cpp #916255 —
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 #8a745c —
punctuation.separator.key-value #8a745c —
keyword.operator.expression.import #75715e —
support.constant.math #9c7650 —
support.constant.property.math #ad8650 —
variable.other.constant #9c7650 —
storage.type.annotation.java, storage.type.object.array.java #9c7650 —
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 #8a745c —
storage.modifier.import.java,storage.type.java,storage.type.generic.java #9c7650 —
keyword.operator.instanceof.java #543b3b —
meta.definition.variable.name.java #916255 —
keyword.operator.logical #585858 —
keyword.operator.bitwise #585858 —
keyword.operator.channel #585858 —
support.constant.property-value.scss,support.constant.property-value.css #ad8650 —
keyword.operator.css,keyword.operator.scss,keyword.operator.less #585858 —
support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss #ad8650 —
punctuation.separator.list.comma.css #8a745c —
support.constant.color.w3c-standard-color-name.css #ad8650 —
support.type.vendored.property-name.css #585858 —
support.module.node,support.type.object.module,support.module.node #9c7650 —
entity.name.type.module #9c7650 —
variable.other.readwrite,meta.object-literal.key,support.variable.property,support.variable.object.process,support.variable.object.node #916255 —
support.constant.json #ad8650 —
keyword.operator.expression.instanceof, keyword.operator.new, keyword.operator.ternary, keyword.operator.optional, keyword.operator.expression.keyof #543b3b —
support.type.object.console #916255 —
support.variable.property.process #ad8650 —
entity.name.function,support.function.console #75715e —
keyword.operator.misc.rust #8a745c —
keyword.operator.sigil.rust #543b3b —
keyword.operator.delete #543b3b —
support.type.object.dom #585858 —
support.variable.dom,support.variable.property.dom #916255 —
keyword.operator.arithmetic,keyword.operator.comparison,keyword.operator.decrement,keyword.operator.increment,keyword.operator.relational #585858 —
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 #543b3b —
punctuation.separator.delimiter #8a745c —
punctuation.separator.c,punctuation.separator.cpp #543b3b —
support.type.posix-reserved.c,support.type.posix-reserved.cpp #585858 —
keyword.operator.sizeof.c,keyword.operator.sizeof.cpp #543b3b —
variable.parameter.function.language.python #ad8650 —
support.type.python #585858 —
keyword.operator.logical.python #543b3b —
variable.parameter.function.python #ad8650 —
punctuation.definition.arguments.begin.python,punctuation.definition.arguments.end.python,punctuation.separator.arguments.python,punctuation.definition.list.begin.python,punctuation.definition.list.end.python #8a745c —
meta.function-call.generic.python #75715e —
constant.character.format.placeholder.other.python #ad8650 —
keyword.operator.assignment.compound #543b3b —
keyword.operator.assignment.compound.js,keyword.operator.assignment.compound.ts #585858 —
entity.name.namespace #9c7650 —
variable.language #9c7650 —
token.variable.parameter.java #8a745c —
import.storage.java #9c7650 —
token.package.keyword #543b3b —
entity.name.function, meta.require, support.function.any-method, variable.function #75715e —
entity.name.type.namespace #9c7650 —
support.class, entity.name.type.class #9c7650 —
entity.name.class.identifier.namespace.type #9c7650 —
entity.name.class, variable.other.class.js, variable.other.class.ts #9c7650 —
variable.other.class.php #916255 —
control.elements, keyword.operator.less #ad8650 —
keyword.other.special-method #75715e —
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 #543b3b —
token.storage.type.java #9c7650 —
support.type.property-name #8a745c —
support.constant.property-value #8a745c —
support.constant.font-name #ad8650 —
entity.other.inherited-class #9c7650 —
constant.other.symbol #585858 —
punctuation.definition.constant #ad8650 —
entity.other.attribute-name #ad8650 —
entity.other.attribute-name.id #75715e normal
entity.other.attribute-name.class.css #ad8650 normal
markup.heading punctuation.definition.heading, entity.name.section #75715e —
keyword.other.unit #916255 —
markup.bold,todo.bold #ad8650 —
punctuation.definition.bold #9c7650 —
markup.italic, punctuation.definition.italic,todo.emphasis #543b3b —
entity.name.section.markdown #916255 —
punctuation.definition.heading.markdown #916255 —
punctuation.definition.list.begin.markdown #916255 —
markup.heading.setext #8a745c —
punctuation.definition.bold.markdown #ad8650 —
markup.inline.raw.markdown #858167 —
markup.inline.raw.string.markdown #858167 —
punctuation.definition.list.markdown #916255 —
punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown #916255 —
beginning.punctuation.definition.list.markdown #916255 —
punctuation.definition.metadata.markdown #916255 —
markup.underline.link.markdown,markup.underline.link.image.markdown #543b3b —
string.other.link.title.markdown,string.other.link.description.markdown #75715e —
constant.character.escape #585858 —
punctuation.section.embedded, variable.interpolation #916255 —
punctuation.section.embedded.begin,punctuation.section.embedded.end #543b3b —
invalid.illegal.bad-ampersand.html #8a745c —
invalid.deprecated #ffffff —
invalid.unimplemented #ffffff —
source.json meta.structure.dictionary.json > string.quoted.json #916255 —
source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string #916255 —
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 #858167 —
source.json meta.structure.dictionary.json > constant.language.json,source.json meta.structure.array.json > constant.language.json #585858 —
support.type.property-name.json #916255 —
support.type.property-name.json punctuation #916255 —
text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade #543b3b —
text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade #543b3b —
support.other.namespace.use.php,support.other.namespace.use-as.php,support.other.namespace.php,entity.other.alias.php,meta.interface.php #9c7650 —
keyword.operator.error-control.php #543b3b —
keyword.operator.type.php #543b3b —
punctuation.section.array.begin.php #8a745c —
punctuation.section.array.end.php #8a745c —
invalid.illegal.non-null-typehinted.php #f44747 —
storage.type.php,meta.other.type.phpdoc.php,keyword.other.type.php,keyword.other.array.phpdoc.php #9c7650 —
meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php #75715e —
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 #8a745c —
support.constant.core.rust #ad8650 —
support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php #ad8650 —
entity.name.goto-label.php,support.other.php #75715e —
keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php #585858 —
keyword.operator.regexp.php #543b3b —
keyword.operator.comparison.php #585858 —
keyword.operator.heredoc.php,keyword.operator.nowdoc.php #543b3b —
meta.function.decorator.python #75715e —
support.token.decorator.python,meta.function.decorator.identifier.python #585858 —
function.parameter #8a745c —
function.parameter.ruby, function.parameter.cs #8a745c —
constant.language.symbol.ruby #585858 —
inline-color-decoration rgb-value #ad8650 —
support.type.primitive.ts,support.type.builtin.ts,support.type.primitive.tsx,support.type.builtin.tsx #9c7650 —
block.scope.end,block.scope.begin #8a745c —
entity.name.variable.local.cs #916255 —
token.error-token #f44747 —
token.debug-token #543b3b —
punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded #543b3b —
meta.template.expression #8a745c —
keyword.operator.module #543b3b —
support.type.type.flowtype #75715e —
support.type.primitive #9c7650 —
meta.property.object #916255 —
variable.parameter.function.js #916255 —
keyword.other.template.begin #858167 —
keyword.other.template.end #858167 —
keyword.other.substitution.begin #858167 —
keyword.other.substitution.end #858167 —
keyword.operator.assignment #585858 —
keyword.operator.assignment.go #9c7650 —
keyword.operator.arithmetic.go, keyword.operator.address.go #543b3b —
entity.name.package.go #9c7650 —
support.type.prelude.elm #585858 —
support.constant.elm #ad8650 —
punctuation.quasi.element #543b3b —
constant.character.entity #916255 —
entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class #585858 —
entity.global.clojure #9c7650 —
meta.symbol.clojure #916255 —
constant.keyword.clojure #585858 —
meta.arguments.coffee, variable.parameter.function.coffee #916255 —
meta.scope.prerequisites.makefile #916255 —
storage.modifier.import.groovy #9c7650 —
meta.method.groovy #75715e —
meta.definition.variable.name.groovy #916255 —
meta.definition.class.inherited.classes.groovy #858167 —
support.variable.semantic.hlsl #9c7650 —
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 #543b3b —
text.variable, text.bracketed #916255 —
support.type.swift, support.type.vb.asp #9c7650 —
entity.name.function.xi #9c7650 —
entity.name.class.xi #585858 —
constant.character.character-class.regexp.xi #916255 —
constant.regexp.xi #543b3b —
keyword.control.xi #585858 —
beginning.punctuation.definition.quote.markdown.xi #858167 —
beginning.punctuation.definition.list.markdown.xi #3f4041 —
constant.character.xi #75715e —
constant.other.color.rgb-value.xi #ffffff —
punctuation.definition.tag.xi #3f4041 —
entity.name.label.cs, entity.name.scope-resolution.function.call, entity.name.scope-resolution.function.definition #9c7650 —
entity.name.label.cs, markup.heading.setext.1.markdown, markup.heading.setext.2.markdown #916255 —
meta.brace.square #8a745c —
comment, punctuation.definition.comment #3f4041 italic
markup.quote.markdown #3f4041 —
punctuation.definition.block.sequence.item.yaml #8a745c —
constant.language.symbol.elixir #585858 —
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 } !` ;
}
Zan | Coding Theme