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.activeBorder #ffaa33b3 activityBar.background #fcfcfc activityBar.border #6b7d8f1f activityBar.foreground #8a9199cc activityBar.inactiveForeground #8a919999 activityBarBadge.background #ffaa33 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 #577590 — variable.other.generic-type.haskell #ff1f23 — storage.type.haskell #69c227 — support.variable.magic.python
Shiki preview TypeScript sample highlighted with this variant's colors and tokenColors.
VibrantTheme — Vibrant Theme
activityBarBadge.foreground #f8f9fa
badge.background #ffaa3333
badge.foreground #f4a028
button.background #ffaa33
button.foreground #f8f9fa
button.hoverBackground #f9a52e
button.secondaryBackground #8a919933
button.secondaryForeground #5c6166
button.secondaryHoverBackground #8a919980
debugConsoleInputIcon.foreground #ffaa33
debugExceptionWidget.background #f3f4f5
debugExceptionWidget.border #6b7d8f1f
debugIcon.breakpointDisabledForeground #ed936680
debugIcon.breakpointForeground #ed9366
debugToolBar.background #f3f4f5
descriptionForeground #8a9199
diffEditor.diagonalFill #6b7d8f1f
diffEditor.insertedTextBackground #6cbf431f
diffEditor.removedTextBackground #ff73831f
dropdown.background #fcfcfc
dropdown.border #8a919945
dropdown.foreground #8a9199
editor.background #fcfcfc
editor.findMatchBackground #9f40ff2b
editor.findMatchBorder #9f40ff2b
editor.findMatchHighlightBackground #9f40ffcc
editor.findMatchHighlightBorder #8f30efcc
editor.findRangeHighlightBackground #9f40ff40
editor.foreground #29343d
editor.inactiveSelectionBackground #035bd612
editor.lineHighlightBackground #8a91991a
editor.rangeHighlightBackground #9f40ff33
editor.selectionBackground #035bd626
editor.selectionHighlightBackground #6cbf4326
editor.selectionHighlightBorder #6cbf4300
editor.snippetTabstopHighlightBackground #6cbf4333
editor.wordHighlightBackground #478acc14
editor.wordHighlightBorder #478acc80
editor.wordHighlightStrongBackground #6cbf4314
editor.wordHighlightStrongBorder #6cbf4380
editorBracketMatch.background #8a91994d
editorBracketMatch.border #8a91994d
editorCodeLens.foreground #787b8099
editorCursor.foreground #ffaa33
editorError.foreground #e65050
editorGroup.background #f3f4f5
editorGroup.border #6b7d8f1f
editorGroupHeader.noTabsBackground #f8f9fa
editorGroupHeader.tabsBackground #f8f9fa
editorGroupHeader.tabsBorder #6b7d8f1f
editorGutter.addedBackground #6cbf43cc
editorGutter.deletedBackground #ff7383cc
editorGutter.modifiedBackground #478acccc
editorHoverWidget.background #f8f9fa
editorHoverWidget.border #6b7d8f1f
editorIndentGuide.activeBackground #8a919959
editorIndentGuide.background #8a91992e
editorLineNumber.activeForeground #8a9199cc
editorLineNumber.foreground #8a919966
editorLink.activeForeground #ffaa33
editorMarkerNavigation.background #f3f4f5
editorOverviewRuler.addedForeground #6cbf43
editorOverviewRuler.border #6b7d8f1f
editorOverviewRuler.bracketMatchForeground #8a9199b3
editorOverviewRuler.deletedForeground #ff7383
editorOverviewRuler.errorForeground #e65050
editorOverviewRuler.findMatchForeground #9f40ff2b
editorOverviewRuler.modifiedForeground #478acc
editorOverviewRuler.warningForeground #ffaa33
editorOverviewRuler.wordHighlightForeground #478acc66
editorOverviewRuler.wordHighlightStrongForeground #6cbf4366
editorRuler.foreground #8a91992e
editorSuggestWidget.background #f3f4f5
editorSuggestWidget.border #6b7d8f1f
editorSuggestWidget.highlightForeground #ffaa33
editorSuggestWidget.selectedBackground #56728f1f
editorWarning.foreground #ffaa33
editorWhitespace.foreground #8a919966
editorWidget.background #f8f9fa
editorWidget.border #6b7d8f1f
errorForeground #e65050
extensionButton.prominentBackground #ffaa33
extensionButton.prominentForeground #fcfcfc
extensionButton.prominentHoverBackground #f9a52e
focusBorder #ffaa33b3
foreground #8a9199
gitDecoration.conflictingResourceForeground
gitDecoration.deletedResourceForeground #ff7383b3
gitDecoration.ignoredResourceForeground #8a919980
gitDecoration.modifiedResourceForeground #478accb3
gitDecoration.submoduleResourceForeground #a37accb3
gitDecoration.untrackedResourceForeground #6cbf43b3
icon.foreground #8a9199
input.background #fcfcfc
input.border #8a919945
input.foreground #5c6166
input.placeholderForeground #8a919980
inputOption.activeBackground #ffaa3333
inputOption.activeBorder #f4a0284d
inputOption.activeForeground #f4a028
inputValidation.errorBackground #fcfcfc
inputValidation.errorBorder #e65050
inputValidation.infoBackground #f8f9fa
inputValidation.infoBorder #55b4d4
inputValidation.warningBackground #f8f9fa
inputValidation.warningBorder #f2ae49
keybindingLabel.background #8a91991a
keybindingLabel.border #5c61661a
keybindingLabel.bottomBorder #5c61661a
keybindingLabel.foreground #5c6166
list.activeSelectionBackground #56728f1f
list.activeSelectionForeground #5c6166
list.deemphasizedForeground #e65050
list.errorForeground #e65050
list.filterMatchBackground #8f30efcc
list.filterMatchBorder #9f40ffcc
list.focusBackground #56728f1f
list.focusForeground #5c6166
list.focusOutline #56728f1f
list.highlightForeground #ffaa33
list.hoverBackground #56728f1f
list.inactiveSelectionBackground #6b7d8f1f
list.inactiveSelectionForeground #8a9199
list.invalidItemForeground #8a91994d
listFilterWidget.background #f3f4f5
listFilterWidget.noMatchesOutline #e65050
listFilterWidget.outline #ffaa33
minimap.background #fcfcfc
minimap.errorHighlight #e65050
minimap.findMatchHighlight #9f40ff2b
minimap.selectionHighlight #035bd626
minimapGutter.addedBackground #6cbf43
minimapGutter.deletedBackground #ff7383
minimapGutter.modifiedBackground #478acc
panel.background #f8f9fa
panel.border #6b7d8f1f
panelTitle.activeBorder #ffaa33
panelTitle.activeForeground #5c6166
panelTitle.inactiveForeground #8a9199
peekView.border #56728f1f
peekViewEditor.background #f8f9fa
peekViewEditor.matchHighlightBackground #9f40ffcc
peekViewEditor.matchHighlightBorder #8f30efcc
peekViewResult.background #f8f9fa
peekViewResult.fileForeground #5c6166
peekViewResult.lineForeground #8a9199
peekViewResult.matchHighlightBackground #9f40ffcc
peekViewResult.selectionBackground #56728f1f
peekViewTitle.background #56728f1f
peekViewTitleDescription.foreground #8a9199
peekViewTitleLabel.foreground #5c6166
pickerGroup.border #6b7d8f1f
pickerGroup.foreground #8a919980
progressBar.background #ffaa33
scrollbar.shadow #6b7d8f00
scrollbarSlider.activeBackground #8a9199b3
scrollbarSlider.background #8a919966
scrollbarSlider.hoverBackground #8a919999
selection.background #035bd626
settings.headerForeground #5c6166
settings.modifiedItemIndicator #478acc
sideBar.background #f8f9fa
sideBar.border #6b7d8f1f
sideBarSectionHeader.background #f8f9fa
sideBarSectionHeader.border #6b7d8f1f
sideBarSectionHeader.foreground #8a9199
sideBarTitle.foreground #8a9199
statusBar.background #f8f9fa
statusBar.border #6b7d8f1f
statusBar.debuggingBackground #ed9366
statusBar.debuggingForeground #fcfcfc
statusBar.foreground #8a9199
statusBar.noFolderBackground #f3f4f5
statusBarItem.activeBackground #8a919933
statusBarItem.hoverBackground #8a919933
statusBarItem.prominentBackground #6b7d8f1f
statusBarItem.prominentHoverBackground #00000030
statusBarItem.remoteBackground #ffaa33
statusBarItem.remoteForeground #fcfcfc
tab.activeBackground #fcfcfc
tab.activeBorder #fcfcfc
tab.activeBorderTop #ffaa33
tab.activeForeground #5c6166
tab.border #6b7d8f1f
tab.inactiveBackground #f8f9fa
tab.inactiveForeground #8a9199
tab.unfocusedActiveBorderTop #8a9199
tab.unfocusedActiveForeground #8a9199
tab.unfocusedInactiveForeground #8a9199
terminal.ansiBlack #000000
terminal.ansiBlue #3199e1
terminal.ansiBrightBlack #686868
terminal.ansiBrightBlue #399ee6
terminal.ansiBrightCyan #4cbf99
terminal.ansiBrightGreen #86b300
terminal.ansiBrightMagenta #a37acc
terminal.ansiBrightRed #f07171
terminal.ansiBrightWhite #d1d1d1
terminal.ansiBrightYellow #f2ae49
terminal.ansiCyan #46ba94
terminal.ansiGreen #6cbf43
terminal.ansiMagenta #9e75c7
terminal.ansiRed #ea6c6d
terminal.ansiWhite #c7c7c7
terminal.ansiYellow #eca944
terminal.background #f8f9fa
terminal.foreground #5c6166
textBlockQuote.background #f3f4f5
textLink.activeForeground #ffaa33
textLink.foreground #ffaa33
textPreformat.foreground #5c6166
titleBar.activeBackground #f8f9fa
titleBar.activeForeground #5c6166
titleBar.border #6b7d8f1f
titleBar.inactiveBackground #f8f9fa
titleBar.inactiveForeground #8a9199
tree.indentGuidesStroke #8a919959
walkThrough.embeddedEditorBackground #f3f4f5
welcomePage.buttonBackground #ffaa3366
welcomePage.progress.background #8a91991a
welcomePage.tileBackground #f8f9fa
welcomePage.tileShadow #00000026
widget.shadow #00000026 #577590
punctuation.separator.period.python,punctuation.separator.element.python,punctuation.parenthesis.begin.python,punctuation.parenthesis.end.python #29343d —
variable.parameter.function.language.special.self.python #ff5a00 —
storage.modifier.lifetime.rust #29343d —
support.function.std.rust #0058ff —
entity.name.lifetime.rust #ff5a00 —
variable.language.rust #577590 —
support.constant.edge #ff1f23 —
constant.other.character-class.regexp #577590 —
keyword.operator.quantifier.regexp #69c227 —
punctuation.definition.string.begin,punctuation.definition.string.end #4da907 —
variable.parameter.function #29343d —
comment markup.link #526da3 —
markup.changed.diff #ff5a00 —
meta.diff.header.from-file,meta.diff.header.to-file,punctuation.definition.from-file.diff,punctuation.definition.to-file.diff #0058ff —
markup.inserted.diff #4da907 —
markup.deleted.diff #577590 —
meta.function.c,meta.function.cpp #577590 —
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 #29343d —
punctuation.separator.key-value #29343d —
keyword.operator.expression.import #0058ff —
support.constant.math #ff5a00 —
support.constant.property.math #69c227 —
variable.other.constant #ff5a00 —
storage.type.annotation.java, storage.type.object.array.java #ff5a00 —
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 #29343d —
storage.modifier.import.java,storage.type.java,storage.type.generic.java #ff5a00 —
keyword.operator.instanceof.java #ff1f23 —
meta.definition.variable.name.java #577590 —
keyword.operator.logical #4bb091 —
keyword.operator.bitwise #4bb091 —
keyword.operator.channel #4bb091 —
support.constant.property-value.scss,support.constant.property-value.css #69c227 —
keyword.operator.css,keyword.operator.scss,keyword.operator.less #4bb091 —
support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss #69c227 —
punctuation.separator.list.comma.css #29343d —
support.constant.color.w3c-standard-color-name.css #69c227 —
support.type.vendored.property-name.css #4bb091 —
support.module.node,support.type.object.module,support.module.node #ff5a00 —
entity.name.type.module #ff5a00 —
variable.other.readwrite,meta.object-literal.key,support.variable.property,support.variable.object.process,support.variable.object.node #577590 —
support.constant.json #69c227 —
keyword.operator.expression.instanceof, keyword.operator.new, keyword.operator.ternary, keyword.operator.optional, keyword.operator.expression.keyof #ff1f23 —
support.type.object.console #577590 —
support.variable.property.process #69c227 —
entity.name.function,support.function.console #0058ff —
keyword.operator.misc.rust #29343d —
keyword.operator.sigil.rust #ff1f23 —
keyword.operator.delete #ff1f23 —
support.type.object.dom #4bb091 —
support.variable.dom,support.variable.property.dom #577590 —
keyword.operator.arithmetic,keyword.operator.comparison,keyword.operator.decrement,keyword.operator.increment,keyword.operator.relational #4bb091 —
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 #ff1f23 —
punctuation.separator.delimiter #29343d —
punctuation.separator.c,punctuation.separator.cpp #ff1f23 —
support.type.posix-reserved.c,support.type.posix-reserved.cpp #4bb091 —
keyword.operator.sizeof.c,keyword.operator.sizeof.cpp #ff1f23 —
variable.parameter.function.language.python #69c227 —
support.type.python #4bb091 —
keyword.operator.logical.python #ff1f23 —
variable.parameter.function.python #69c227 —
punctuation.definition.arguments.begin.python,punctuation.definition.arguments.end.python,punctuation.separator.arguments.python,punctuation.definition.list.begin.python,punctuation.definition.list.end.python #29343d —
meta.function-call.generic.python #0058ff —
constant.character.format.placeholder.other.python #69c227 —
keyword.operator.assignment.compound #ff1f23 —
keyword.operator.assignment.compound.js,keyword.operator.assignment.compound.ts #4bb091 —
entity.name.namespace #ff5a00 —
variable.language #ff5a00 —
token.variable.parameter.java #29343d —
import.storage.java #ff5a00 —
token.package.keyword #ff1f23 —
entity.name.function, meta.require, support.function.any-method, variable.function #0058ff —
entity.name.type.namespace #ff5a00 —
support.class, entity.name.type.class #ff5a00 —
entity.name.class.identifier.namespace.type #ff5a00 —
entity.name.class, variable.other.class.js, variable.other.class.ts #ff5a00 —
variable.other.class.php #577590 —
control.elements, keyword.operator.less #69c227 —
keyword.other.special-method #0058ff —
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 #ff1f23 —
token.storage.type.java #ff5a00 —
support.type.property-name #29343d —
support.constant.property-value #29343d —
support.constant.font-name #69c227 —
entity.other.inherited-class #ff5a00 —
constant.other.symbol #4bb091 —
punctuation.definition.constant #69c227 —
entity.other.attribute-name #69c227 —
entity.other.attribute-name.id #0058ff normal
entity.other.attribute-name.class.css #69c227 normal
markup.heading punctuation.definition.heading, entity.name.section #0058ff —
keyword.other.unit #577590 —
markup.bold,todo.bold #69c227 —
punctuation.definition.bold #ff5a00 —
markup.italic, punctuation.definition.italic,todo.emphasis #ff1f23 —
entity.name.section.markdown #577590 —
punctuation.definition.heading.markdown #577590 —
punctuation.definition.list.begin.markdown #577590 —
markup.heading.setext #29343d —
punctuation.definition.bold.markdown #69c227 —
markup.inline.raw.markdown #4da907 —
markup.inline.raw.string.markdown #4da907 —
punctuation.definition.list.markdown #577590 —
punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown #577590 —
beginning.punctuation.definition.list.markdown #577590 —
punctuation.definition.metadata.markdown #577590 —
markup.underline.link.markdown,markup.underline.link.image.markdown #ff1f23 —
string.other.link.title.markdown,string.other.link.description.markdown #0058ff —
constant.character.escape #4bb091 —
punctuation.section.embedded, variable.interpolation #577590 —
punctuation.section.embedded.begin,punctuation.section.embedded.end #ff1f23 —
invalid.illegal.bad-ampersand.html #29343d —
invalid.deprecated #ffffff —
invalid.unimplemented #ffffff —
source.json meta.structure.dictionary.json > string.quoted.json #577590 —
source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string #577590 —
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 #4da907 —
source.json meta.structure.dictionary.json > constant.language.json,source.json meta.structure.array.json > constant.language.json #4bb091 —
support.type.property-name.json #577590 —
support.type.property-name.json punctuation #577590 —
text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade #ff1f23 —
text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade #ff1f23 —
support.other.namespace.use.php,support.other.namespace.use-as.php,support.other.namespace.php,entity.other.alias.php,meta.interface.php #ff5a00 —
keyword.operator.error-control.php #ff1f23 —
keyword.operator.type.php #ff1f23 —
punctuation.section.array.begin.php #29343d —
punctuation.section.array.end.php #29343d —
invalid.illegal.non-null-typehinted.php #f44747 —
storage.type.php,meta.other.type.phpdoc.php,keyword.other.type.php,keyword.other.array.phpdoc.php #ff5a00 —
meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php #0058ff —
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 #29343d —
support.constant.core.rust #69c227 —
support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php #69c227 —
entity.name.goto-label.php,support.other.php #0058ff —
keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php #4bb091 —
keyword.operator.regexp.php #ff1f23 —
keyword.operator.comparison.php #4bb091 —
keyword.operator.heredoc.php,keyword.operator.nowdoc.php #ff1f23 —
meta.function.decorator.python #0058ff —
support.token.decorator.python,meta.function.decorator.identifier.python #4bb091 —
function.parameter #29343d —
function.parameter.ruby, function.parameter.cs #29343d —
constant.language.symbol.ruby #4bb091 —
inline-color-decoration rgb-value #69c227 —
support.type.primitive.ts,support.type.builtin.ts,support.type.primitive.tsx,support.type.builtin.tsx #ff5a00 —
block.scope.end,block.scope.begin #29343d —
entity.name.variable.local.cs #577590 —
token.error-token #f44747 —
token.debug-token #ff1f23 —
punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded #ff1f23 —
meta.template.expression #29343d —
keyword.operator.module #ff1f23 —
support.type.type.flowtype #0058ff —
support.type.primitive #ff5a00 —
meta.property.object #577590 —
variable.parameter.function.js #577590 —
keyword.other.template.begin #4da907 —
keyword.other.template.end #4da907 —
keyword.other.substitution.begin #4da907 —
keyword.other.substitution.end #4da907 —
keyword.operator.assignment #4bb091 —
keyword.operator.assignment.go #ff5a00 —
keyword.operator.arithmetic.go, keyword.operator.address.go #ff1f23 —
entity.name.package.go #ff5a00 —
support.type.prelude.elm #4bb091 —
support.constant.elm #69c227 —
punctuation.quasi.element #ff1f23 —
constant.character.entity #577590 —
entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class #4bb091 —
entity.global.clojure #ff5a00 —
meta.symbol.clojure #577590 —
constant.keyword.clojure #4bb091 —
meta.arguments.coffee, variable.parameter.function.coffee #577590 —
meta.scope.prerequisites.makefile #577590 —
storage.modifier.import.groovy #ff5a00 —
meta.method.groovy #0058ff —
meta.definition.variable.name.groovy #577590 —
meta.definition.class.inherited.classes.groovy #4da907 —
support.variable.semantic.hlsl #ff5a00 —
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 #ff1f23 —
text.variable, text.bracketed #577590 —
support.type.swift, support.type.vb.asp #ff5a00 —
entity.name.function.xi #ff5a00 —
entity.name.class.xi #4bb091 —
constant.character.character-class.regexp.xi #577590 —
constant.regexp.xi #ff1f23 —
keyword.control.xi #4bb091 —
beginning.punctuation.definition.quote.markdown.xi #4da907 —
beginning.punctuation.definition.list.markdown.xi #526da3 —
constant.character.xi #0058ff —
constant.other.color.rgb-value.xi #ffffff —
punctuation.definition.tag.xi #526da3 —
entity.name.label.cs, entity.name.scope-resolution.function.call, entity.name.scope-resolution.function.definition #ff5a00 —
entity.name.label.cs, markup.heading.setext.1.markdown, markup.heading.setext.2.markdown #577590 —
meta.brace.square #29343d —
comment, punctuation.definition.comment #526da3 italic
markup.quote.markdown #526da3 —
punctuation.definition.block.sequence.item.yaml #29343d —
constant.language.symbol.elixir #4bb091 —
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
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*
VibrantTheme | Coding Theme Button.tsx
fetchUser
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 } !` ;
}