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.activeBackground #242021 activityBar.background #2a2426 activityBar.border #242021 activityBar.foreground #e6d6ac activityBar.inactiveForeground #87af87 activityBarBadge.background #87af87 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 #e29870 — variable.other.generic-type.haskell #e68183 — storage.type.haskell #d3a0bc — support.variable.magic.python
Shiki preview TypeScript sample highlighted with this variant's colors and tokenColors.
activityBarBadge.foreground
#242021
badge.background #87af87
badge.foreground #242021
breadcrumb.activeSelectionForeground #87af87
breadcrumb.background #2a2426
breadcrumb.focusForeground #87af87
breadcrumb.foreground #cccccccc
button.background #87af87
button.foreground #2a2426
button.hoverBackground #e6d6ac
button.secondaryBackground #242021
button.secondaryForeground #e6d6ac
button.secondaryHoverBackground #87af87
checkbox.background #87af871a
checkbox.border #ffffff00
checkbox.foreground #e6d6ac
debugExceptionWidget.background #333333
debugExceptionWidget.border #474747
debugToolBar.background #333333
debugToolBar.border #474747
diffEditor.border #444444
diffEditor.insertedTextBackground #9bb95533
diffEditor.removedTextBackground #ff000033
dropdown.background #87af871a
dropdown.border #ffffff00
dropdown.foreground #e6d6ac
editor.background #2a2426
editor.findMatchBackground #87af8754
editor.findMatchBorder #87af87
editor.findMatchHighlightBackground #87af87
editor.findMatchHighlightBorder #ffffff00
editor.findRangeHighlightBackground #242021
editor.findRangeHighlightBorder #242021
editor.foldBackground #87af873a
editor.foreground #e6d6ac
editor.hoverHighlightBackground #264f7840
editor.inactiveSelectionBackground #242021
editor.lineHighlightBackground #ffffff0A
editor.lineHighlightBorder #282828
editor.rangeHighlightBackground #ffffff0b
editor.rangeHighlightBorder #ffffff00
editor.selectionBackground #e6d6ac36
editor.selectionHighlightBackground #e6d6ac36
editor.selectionHighlightBorder #87af87
editor.wordHighlightBackground #575757b8
editor.wordHighlightStrongBackground #87af8764
editorBracketMatch.background #87af8789
editorBracketMatch.border #87af87
editorCodeLens.foreground #999999
editorCursor.background #2a2426
editorCursor.foreground #87af87
editorError.background #B73A3400
editorError.border #ffffff00
editorError.foreground #f48771
editorGroup.border #242021
editorGroup.emptyBackground #2a2426
editorGroupHeader.border #ffffff00
editorGroupHeader.tabsBackground #242021
editorGutter.addedBackground #587c0c
editorGutter.background #2a2426
editorGutter.commentRangeForeground #87af87
editorGutter.deletedBackground #94151b
editorGutter.foldingControlForeground #87af87
editorGutter.modifiedBackground #0c7d9d
editorHoverWidget.background #252526
editorHoverWidget.border #454545
editorHoverWidget.foreground #cccccc
editorIndentGuide.activeBackground #87af87
editorIndentGuide.background #242021
editorInfo.background #4490BF00
editorInfo.border #4490BF00
editorInfo.foreground #87af87
editorLineNumber.activeForeground #e6d6ac
editorLineNumber.foreground #e6d6ac40
editorLink.activeForeground #87af87
editorMarkerNavigation.background #2d2d30
editorMarkerNavigationError.background #f48771
editorMarkerNavigationInfo.background #75beff
editorMarkerNavigationWarning.background #cca700
editorOverviewRuler.background #25252500
editorOverviewRuler.border #7f7f7f4d
editorRuler.foreground #242021
editorSuggestWidget.background #242021
editorSuggestWidget.border #87af87
editorSuggestWidget.foreground #e6d6ac
editorSuggestWidget.highlightForeground #87af87
editorSuggestWidget.selectedBackground #2a2426
editorWarning.background #A9904000
editorWarning.border #ffffff00
editorWarning.foreground #cca700
editorWhitespace.foreground #e6d6ac36
editorWidget.background #242021
editorWidget.foreground #e6d6ac
editorWidget.resizeBorder #5F5F5F
focusBorder #87af87
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 #87af871a
input.border #ffffff00
input.foreground #e6d6ac
input.placeholderForeground #e6d6ac54
inputOption.activeBackground #87af87
inputOption.activeBorder #007acc00
inputOption.activeForeground #ffffff
list.activeSelectionBackground #242021
list.activeSelectionForeground #87af87
list.dropBackground #87af8714
list.focusBackground #87af8730
list.focusForeground #cccccc
list.highlightForeground #87af87
list.hoverBackground #87af8714
list.hoverForeground #e6d6ac
list.inactiveSelectionBackground #242021
list.inactiveSelectionForeground #684e40
listFilterWidget.background #87af8730
listFilterWidget.noMatchesOutline #87af87
listFilterWidget.outline #00000000
menu.background #252526
menu.border #e6d6ac18
menu.foreground #e6d6ac
menu.selectionBackground #87af8714
menu.selectionBorder #00000000
menu.selectionForeground #87af87
menu.separatorBackground #242021
menubar.selectionBackground #e6d6ac
menubar.selectionBorder #e6d6ac
menubar.selectionForeground #242021
merge.commonContentBackground #282828
merge.commonHeaderBackground #383838
merge.currentContentBackground #27403B
merge.currentHeaderBackground #367366
merge.incomingContentBackground #28384B
merge.incomingHeaderBackground #395F8F
minimap.background #2a2426
minimap.errorHighlight #f48771
minimap.findMatchHighlight #87af8754
minimap.selectionHighlight #e6d6ac36
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 #e6d6ac
notificationsErrorIcon.foreground #f48771
notificationsInfoIcon.foreground #75beff
notificationsWarningIcon.foreground #cca700
notificationToast.border #474747
panel.background #2a2426
panel.border #87af87
panelSection.border #242021
panelTitle.activeBorder #e6d6ac
panelTitle.activeForeground #e6d6ac
panelTitle.inactiveForeground #87af87
peekView.border #242021
peekViewEditor.background #242021
peekViewEditor.matchHighlightBackground #ff8f0099
peekViewEditor.matchHighlightBorder #ee931e
peekViewEditorGutter.background #242021
peekViewResult.background #252526
peekViewResult.fileForeground #ffffff
peekViewResult.lineForeground #bbbbbb
peekViewResult.matchHighlightBackground #ea5c004d
peekViewResult.selectionBackground #242021
peekViewResult.selectionForeground #ffffff
peekViewTitle.background #1e1e1e
peekViewTitleDescription.foreground #ccccccb3
peekViewTitleLabel.foreground #ffffff
pickerGroup.border #87af87
pickerGroup.foreground #87af87
progressBar.background #87af87
scrollbar.shadow #00000000
scrollbarSlider.activeBackground #e6d6ac
scrollbarSlider.background #242021
scrollbarSlider.hoverBackground #87af87
selection.background #242021
settings.focusedRowBackground #ffffff07
settings.headerForeground #cccccc
sideBar.background #2a2426
sideBar.border #242021
sideBar.dropBackground #87af8714
sideBar.foreground #e6d6ac
sideBarSectionHeader.background #2a2426
sideBarSectionHeader.border #2a2426
sideBarSectionHeader.foreground #e6d6ac
sideBarTitle.foreground #e6d6ac
statusBar.background #242021
statusBar.debuggingBackground #87af87
statusBar.debuggingBorder #e6d6ac
statusBar.debuggingForeground #ffffff
statusBar.foreground #e6d6ac
statusBar.noFolderBackground #c05050
statusBar.noFolderBorder #c05050
statusBar.noFolderForeground #ffffff
statusBarItem.activeBackground #FFFFFF25
statusBarItem.hoverBackground #ffffff1f
statusBarItem.remoteBackground #87af87
statusBarItem.remoteForeground #e6d6ac
tab.activeBackground #2a2426
tab.activeBorder #ffffff00
tab.activeBorderTop #87af87
tab.activeForeground #87af87
tab.border #242021
tab.hoverBackground #2a2426
tab.inactiveBackground #242021
tab.inactiveForeground #684e40
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 #242021
terminal.foreground #e6d6ac
terminal.selectionBackground #87af8718
terminalCursor.background #87af87
terminalCursor.foreground #e6d6ac
textLink.foreground #87af87
titleBar.activeBackground #2a2426
titleBar.activeForeground #e6d6ac
titleBar.border #242021
titleBar.inactiveBackground #242021
titleBar.inactiveForeground #cccccc99
tree.indentGuidesStroke #87af87
walkThrough.embeddedEditorBackground #00000050
widget.shadow #00000026 #e29870
punctuation.separator.period.python,punctuation.separator.element.python,punctuation.parenthesis.begin.python,punctuation.parenthesis.end.python #e6d6ac —
variable.parameter.function.language.special.self.python #89beba —
storage.modifier.lifetime.rust #e6d6ac —
support.function.std.rust #87af87 —
entity.name.lifetime.rust #89beba —
variable.language.rust #e29870 —
support.constant.edge #e68183 —
constant.other.character-class.regexp #e29870 —
keyword.operator.quantifier.regexp #d3a0bc —
punctuation.definition.string.begin,punctuation.definition.string.end #87af87 —
variable.parameter.function #e6d6ac —
comment markup.link #444444 —
markup.changed.diff #89beba —
meta.diff.header.from-file,meta.diff.header.to-file,punctuation.definition.from-file.diff,punctuation.definition.to-file.diff #87af87 —
markup.inserted.diff #87af87 —
markup.deleted.diff #e29870 —
meta.function.c,meta.function.cpp #e29870 —
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 #e6d6ac —
punctuation.separator.key-value #e6d6ac —
keyword.operator.expression.import #87af87 —
support.constant.math #89beba —
support.constant.property.math #d3a0bc —
variable.other.constant #89beba —
storage.type.annotation.java, storage.type.object.array.java #89beba —
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 #e6d6ac —
storage.modifier.import.java,storage.type.java,storage.type.generic.java #89beba —
keyword.operator.instanceof.java #e68183 —
meta.definition.variable.name.java #e29870 —
keyword.operator.logical #e29870 —
keyword.operator.bitwise #e29870 —
keyword.operator.channel #e29870 —
support.constant.property-value.scss,support.constant.property-value.css #d3a0bc —
keyword.operator.css,keyword.operator.scss,keyword.operator.less #e29870 —
support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss #d3a0bc —
punctuation.separator.list.comma.css #e6d6ac —
support.constant.color.w3c-standard-color-name.css #d3a0bc —
support.type.vendored.property-name.css #e29870 —
support.module.node,support.type.object.module,support.module.node #89beba —
entity.name.type.module #89beba —
variable.other.readwrite,meta.object-literal.key,support.variable.property,support.variable.object.process,support.variable.object.node #e29870 —
support.constant.json #d3a0bc —
keyword.operator.expression.instanceof, keyword.operator.new, keyword.operator.ternary, keyword.operator.optional, keyword.operator.expression.keyof #e68183 —
support.type.object.console #e29870 —
support.variable.property.process #d3a0bc —
entity.name.function,support.function.console #87af87 —
keyword.operator.misc.rust #e6d6ac —
keyword.operator.sigil.rust #e68183 —
keyword.operator.delete #e68183 —
support.type.object.dom #e29870 —
support.variable.dom,support.variable.property.dom #e29870 —
keyword.operator.arithmetic,keyword.operator.comparison,keyword.operator.decrement,keyword.operator.increment,keyword.operator.relational #e29870 —
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 #e68183 —
punctuation.separator.delimiter #e6d6ac —
punctuation.separator.c,punctuation.separator.cpp #e68183 —
support.type.posix-reserved.c,support.type.posix-reserved.cpp #e29870 —
keyword.operator.sizeof.c,keyword.operator.sizeof.cpp #e68183 —
variable.parameter.function.language.python #d3a0bc —
support.type.python #e29870 —
keyword.operator.logical.python #e68183 —
variable.parameter.function.python #d3a0bc —
punctuation.definition.arguments.begin.python,punctuation.definition.arguments.end.python,punctuation.separator.arguments.python,punctuation.definition.list.begin.python,punctuation.definition.list.end.python #e6d6ac —
meta.function-call.generic.python #87af87 —
constant.character.format.placeholder.other.python #d3a0bc —
keyword.operator.assignment.compound #e68183 —
keyword.operator.assignment.compound.js,keyword.operator.assignment.compound.ts #e29870 —
entity.name.namespace #89beba —
variable.language #89beba —
token.variable.parameter.java #e6d6ac —
import.storage.java #89beba —
token.package.keyword #e68183 —
entity.name.function, meta.require, support.function.any-method, variable.function #87af87 —
entity.name.type.namespace #89beba —
support.class, entity.name.type.class #89beba —
entity.name.class.identifier.namespace.type #89beba —
entity.name.class, variable.other.class.js, variable.other.class.ts #89beba —
variable.other.class.php #e29870 —
control.elements, keyword.operator.less #d3a0bc —
keyword.other.special-method #87af87 —
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 #e68183 —
token.storage.type.java #89beba —
support.type.property-name #e6d6ac —
support.constant.property-value #e6d6ac —
support.constant.font-name #d3a0bc —
entity.other.inherited-class #89beba —
constant.other.symbol #e29870 —
punctuation.definition.constant #d3a0bc —
entity.other.attribute-name #d3a0bc —
entity.other.attribute-name.id #87af87 normal
entity.other.attribute-name.class.css #d3a0bc normal
markup.heading punctuation.definition.heading, entity.name.section #87af87 —
keyword.other.unit #e29870 —
markup.bold,todo.bold #d3a0bc —
punctuation.definition.bold #89beba —
markup.italic, punctuation.definition.italic,todo.emphasis #e68183 —
entity.name.section.markdown #e29870 —
punctuation.definition.heading.markdown #e29870 —
punctuation.definition.list.begin.markdown #e29870 —
markup.heading.setext #e6d6ac —
punctuation.definition.bold.markdown #d3a0bc —
markup.inline.raw.markdown #87af87 —
markup.inline.raw.string.markdown #87af87 —
punctuation.definition.list.markdown #e29870 —
punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown #e29870 —
beginning.punctuation.definition.list.markdown #e29870 —
punctuation.definition.metadata.markdown #e29870 —
markup.underline.link.markdown,markup.underline.link.image.markdown #e68183 —
string.other.link.title.markdown,string.other.link.description.markdown #87af87 —
constant.character.escape #e29870 —
punctuation.section.embedded, variable.interpolation #e29870 —
punctuation.section.embedded.begin,punctuation.section.embedded.end #e68183 —
invalid.illegal.bad-ampersand.html #e6d6ac —
invalid.deprecated #ffffff —
invalid.unimplemented #ffffff —
source.json meta.structure.dictionary.json > string.quoted.json #e29870 —
source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string #e29870 —
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 #87af87 —
source.json meta.structure.dictionary.json > constant.language.json,source.json meta.structure.array.json > constant.language.json #e29870 —
support.type.property-name.json #e29870 —
support.type.property-name.json punctuation #e29870 —
text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade #e68183 —
text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade #e68183 —
support.other.namespace.use.php,support.other.namespace.use-as.php,support.other.namespace.php,entity.other.alias.php,meta.interface.php #89beba —
keyword.operator.error-control.php #e68183 —
keyword.operator.type.php #e68183 —
punctuation.section.array.begin.php #e6d6ac —
punctuation.section.array.end.php #e6d6ac —
invalid.illegal.non-null-typehinted.php #f44747 —
storage.type.php,meta.other.type.phpdoc.php,keyword.other.type.php,keyword.other.array.phpdoc.php #89beba —
meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php #87af87 —
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 #e6d6ac —
support.constant.core.rust #d3a0bc —
support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php #d3a0bc —
entity.name.goto-label.php,support.other.php #87af87 —
keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php #e29870 —
keyword.operator.regexp.php #e68183 —
keyword.operator.comparison.php #e29870 —
keyword.operator.heredoc.php,keyword.operator.nowdoc.php #e68183 —
meta.function.decorator.python #87af87 —
support.token.decorator.python,meta.function.decorator.identifier.python #e29870 —
function.parameter #e6d6ac —
function.parameter.ruby, function.parameter.cs #e6d6ac —
constant.language.symbol.ruby #e29870 —
inline-color-decoration rgb-value #d3a0bc —
support.type.primitive.ts,support.type.builtin.ts,support.type.primitive.tsx,support.type.builtin.tsx #89beba —
block.scope.end,block.scope.begin #e6d6ac —
entity.name.variable.local.cs #e29870 —
token.error-token #f44747 —
token.debug-token #e68183 —
punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded #e68183 —
meta.template.expression #e6d6ac —
keyword.operator.module #e68183 —
support.type.type.flowtype #87af87 —
support.type.primitive #89beba —
meta.property.object #e29870 —
variable.parameter.function.js #e29870 —
keyword.other.template.begin #87af87 —
keyword.other.template.end #87af87 —
keyword.other.substitution.begin #87af87 —
keyword.other.substitution.end #87af87 —
keyword.operator.assignment #e29870 —
keyword.operator.assignment.go #89beba —
keyword.operator.arithmetic.go, keyword.operator.address.go #e68183 —
entity.name.package.go #89beba —
support.type.prelude.elm #e29870 —
support.constant.elm #d3a0bc —
punctuation.quasi.element #e68183 —
constant.character.entity #e29870 —
entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class #e29870 —
entity.global.clojure #89beba —
meta.symbol.clojure #e29870 —
constant.keyword.clojure #e29870 —
meta.arguments.coffee, variable.parameter.function.coffee #e29870 —
meta.scope.prerequisites.makefile #e29870 —
storage.modifier.import.groovy #89beba —
meta.method.groovy #87af87 —
meta.definition.variable.name.groovy #e29870 —
meta.definition.class.inherited.classes.groovy #87af87 —
support.variable.semantic.hlsl #89beba —
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 #e68183 —
text.variable, text.bracketed #e29870 —
support.type.swift, support.type.vb.asp #89beba —
entity.name.function.xi #89beba —
entity.name.class.xi #e29870 —
constant.character.character-class.regexp.xi #e29870 —
constant.regexp.xi #e68183 —
keyword.control.xi #e29870 —
beginning.punctuation.definition.quote.markdown.xi #87af87 —
beginning.punctuation.definition.list.markdown.xi #444444 —
constant.character.xi #87af87 —
constant.other.color.rgb-value.xi #ffffff —
punctuation.definition.tag.xi #444444 —
entity.name.label.cs, entity.name.scope-resolution.function.call, entity.name.scope-resolution.function.definition #89beba —
entity.name.label.cs, markup.heading.setext.1.markdown, markup.heading.setext.2.markdown #e29870 —
meta.brace.square #e6d6ac —
comment, punctuation.definition.comment #444444 italic
markup.quote.markdown #444444 —
punctuation.definition.block.sequence.item.yaml #e6d6ac —
constant.language.symbol.elixir #e29870 —
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...
~/my-project
main*
Miramare | Coding Theme 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 } !` ;
}