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 #ffffff activityBar.background #ffffff activityBar.border #d3cdcd activityBar.foreground #000000 activityBar.inactiveForeground #00000066 activityBarBadge.background #00000091 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 #ff3040 — variable.other.generic-type.haskell #c500ff — storage.type.haskell #ff7c00 — support.variable.magic.python
Shiki preview TypeScript sample highlighted with this variant's colors and tokenColors.
none | Coding Theme
activityBarBadge.foreground #ffffff
badge.background #0808087a
badge.foreground #ffffff
breadcrumb.activeSelectionForeground #fb0000
breadcrumb.background #ffffff
breadcrumb.focusForeground #fb0000
breadcrumb.foreground #616161cc
button.background #626262
button.foreground #ffffff
button.hoverBackground #454545
button.secondaryBackground #909090
button.secondaryForeground #ffffff
button.secondaryHoverBackground #434343
checkbox.background #ffffff
checkbox.border #ffffff00
checkbox.foreground #000000
debugExceptionWidget.background #ffffff
debugExceptionWidget.border #d5d5d583
debugToolBar.background #ffffff
debugToolBar.border #d5d5d583
diffEditor.border #d7d7d7
diffEditor.insertedTextBackground #9bb95533
diffEditor.removedTextBackground #ff000033
dropdown.background #ffffff
dropdown.border #ffffff00
dropdown.foreground #000000
editor.background #ffffff
editor.findMatchBackground #5c5c5cc1
editor.findMatchBorder #ffffff00
editor.findMatchHighlightBackground #ffa86f50
editor.findMatchHighlightBorder #ffffff00
editor.findRangeHighlightBackground #b4b4b44d
editor.findRangeHighlightBorder #ffffff00
editor.foldBackground #ffffff4d
editor.foreground #000000
editor.hoverHighlightBackground #b6b6b626
editor.inactiveSelectionBackground #f0f0f0
editor.lineHighlightBackground #bababa0a
editor.lineHighlightBorder #c9c9c966
editor.rangeHighlightBackground #fdff0033
editor.rangeHighlightBorder #ffffff00
editor.selectionBackground #f0f0f0
editor.selectionHighlightBackground #00000080
editor.selectionHighlightBorder #59677700
editor.wordHighlightBackground #b0b0b040
editor.wordHighlightBorder #ffffff00
editor.wordHighlightStrongBackground #ababab40
editor.wordHighlightStrongBorder #ffffff00
editorBracketMatch.background #6868681a
editorBracketMatch.border #b9b9b9
editorCodeLens.foreground #999999
editorCursor.background #ffffff
editorCursor.foreground #000000
editorError.background #B73A3400
editorError.border #ffffff00
editorError.foreground #e51400
editorGroup.border #eeeeee
editorGroup.emptyBackground #ffffff
editorGroupHeader.tabsBackground #ffffff
editorGroupHeader.tabsBorder #ffffff00
editorGutter.addedBackground #81b88b
editorGutter.background #ffffff
editorGutter.commentRangeForeground #424242
editorGutter.deletedBackground #ca4b51
editorGutter.foldingControlForeground #424242
editorGutter.modifiedBackground #66afe0
editorHoverWidget.background #f7f7f7
editorHoverWidget.border #9696966c
editorHoverWidget.foreground #3b3b3b
editorIndentGuide.activeBackground #626262
editorIndentGuide.background #cbcbcb
editorInfo.background #4490BF00
editorInfo.border #4490BF00
editorInfo.foreground #75beff
editorLineNumber.activeForeground #000000
editorLineNumber.foreground #737373
editorLink.activeForeground #ff321c
editorMarkerNavigation.background #ffffff
editorMarkerNavigationError.background #e51400
editorMarkerNavigationInfo.background #75beff
editorMarkerNavigationWarning.background #e9a700
editorOverviewRuler.background #cb4f4f00
editorOverviewRuler.border #cfcfcf4d
editorRuler.foreground #f0f0f0
editorSuggestWidget.background #ffffff
editorSuggestWidget.border #dedede
editorSuggestWidget.foreground #000000
editorSuggestWidget.highlightForeground #000000
editorSuggestWidget.selectedBackground #ececec
editorWarning.background #A9904000
editorWarning.border #ffffff00
editorWarning.foreground #e9a700
editorWhitespace.foreground #51515133
editorWidget.background #f5f5f5
editorWidget.foreground #000000
editorWidget.resizeBorder #ffffff00
focusBorder #00000034
foreground #000000
gitDecoration.addedResourceForeground #587c0c
gitDecoration.conflictingResourceForeground #6c6cc4
gitDecoration.deletedResourceForeground #ad0707
gitDecoration.ignoredResourceForeground #8e8e90
gitDecoration.modifiedResourceForeground #895503
gitDecoration.stageDeletedResourceForeground #ad0707
gitDecoration.stageModifiedResourceForeground #895503
gitDecoration.submoduleResourceForeground #1258a7
gitDecoration.untrackedResourceForeground #007100
icon.foreground #000000
input.background #ffffff
input.border #ffffff00
input.foreground #000000
input.placeholderForeground #8e8e8e
inputOption.activeBackground #a7a7a733
inputOption.activeBorder #ffffff00
inputOption.activeForeground #000000
list.activeSelectionBackground #e8e8e8
list.activeSelectionForeground #000000
list.dropBackground #e5fff8
list.focusBackground #ffffff
list.focusForeground #000000
list.highlightForeground #000000
list.hoverBackground #e0e0e0
list.hoverForeground #616161
list.inactiveSelectionBackground #f2f2f2
list.inactiveSelectionForeground #000000
listFilterWidget.background #eaeaea
listFilterWidget.noMatchesOutline #ffb7b0
listFilterWidget.outline #a52a2a00
menu.background #ffffff
menu.border #73737385
menu.foreground #000000
menu.selectionBackground #9b9b9b
menu.selectionBorder #ffffff00
menu.selectionForeground #ffffff
menu.separatorBackground #e2e2e2
menubar.selectionBackground #b8b8b81a
menubar.selectionBorder #ff000000
menubar.selectionForeground #000000
merge.commonContentBackground #E5E5E5
merge.commonHeaderBackground #BFBFBF
merge.currentContentBackground #DBF4EF
merge.currentHeaderBackground #A4E3D6
merge.incomingContentBackground #DBECFF
merge.incomingHeaderBackground #A6CFFF
minimap.background #ffffff
minimap.errorHighlight #e51400
minimap.findMatchHighlight #5c5c5cc1
minimap.selectionHighlight #f0f0f0
minimap.warningHighlight #e9a700
minimapGutter.addedBackground #81b88b
minimapGutter.deletedBackground #ca4b51
minimapGutter.modifiedBackground #66afe0
notificationCenter.border #d5d5d5
notificationCenterHeader.background #e7e7e7
notificationCenterHeader.foreground #616161
notifications.background #ffffff
notifications.border #e7e7e7
notifications.foreground #616161
notificationsErrorIcon.foreground #e51400
notificationsInfoIcon.foreground #75beff
notificationsWarningIcon.foreground #e9a700
notificationToast.border #e4e4e4
panel.background #ffffff
panel.border #d3d3d359
panelSection.border #99999932
panelTitle.activeBorder #fd8404
panelTitle.activeForeground #000000
panelTitle.inactiveForeground #424242bf
peekView.border #eaeaea
peekViewEditor.background #f5f5f5
peekViewEditor.matchHighlightBackground #ffffffde
peekViewEditor.matchHighlightBorder #f5f5f5
peekViewEditorGutter.background #f5f5f5
peekViewResult.background #f5f5f5
peekViewResult.fileForeground #0a0a0aaf
peekViewResult.lineForeground #000000
peekViewResult.matchHighlightBackground #6b6b6b4d
peekViewResult.selectionBackground #7b7b7b33
peekViewResult.selectionForeground #1b1b1b
peekViewTitle.background #f5f5f5
peekViewTitleDescription.foreground #000000e6
peekViewTitleLabel.foreground #000000
pickerGroup.border #e2e2e2
pickerGroup.foreground #125c80
progressBar.background #00ff1c
scrollbar.shadow #ffffff00
scrollbarSlider.activeBackground #00000099
scrollbarSlider.background #64646466
scrollbarSlider.hoverBackground #646464b3
selection.background #ffffff
settings.focusedRowBackground #ffffff07
settings.headerForeground #000000
sideBar.background #ffffff
sideBar.border #ffffff6a
sideBar.dropBackground #e5fff8
sideBar.foreground #000000
sideBarSectionHeader.background #ffffff00
sideBarSectionHeader.border #ffffff30
sideBarSectionHeader.foreground #000000
sideBarTitle.foreground #000000
statusBar.background #ffffff
statusBar.border #ffffff00
statusBar.debuggingBackground #ffffff
statusBar.debuggingBorder #ffffff
statusBar.debuggingForeground #000000
statusBar.foreground #000000
statusBar.noFolderBackground #ffffff
statusBar.noFolderBorder #ff000000
statusBar.noFolderForeground #000000
statusBarItem.activeBackground #FFFFFF25
statusBarItem.hoverBackground #ffffff1f
statusBarItem.remoteBackground #ffffff
statusBarItem.remoteForeground #000000
tab.activeBackground #ffffff
tab.activeBorder #00000000
tab.activeBorderTop #00000000
tab.activeForeground #000000
tab.border #ffffff
tab.hoverBackground #ffffff
tab.hoverForeground #000000
tab.inactiveBackground #ffffff
tab.inactiveForeground #1d1d1db3
terminal.ansiBlack #000000
terminal.ansiBlue #0451a5
terminal.ansiBrightBlack #666666
terminal.ansiBrightBlue #0451a5
terminal.ansiBrightCyan #0598bc
terminal.ansiBrightGreen #14ce14
terminal.ansiBrightMagenta #bc05bc
terminal.ansiBrightRed #cd3131
terminal.ansiBrightWhite #a5a5a5
terminal.ansiBrightYellow #b5ba00
terminal.ansiCyan #0598bc
terminal.ansiGreen #00bc00
terminal.ansiMagenta #bc05bc
terminal.ansiRed #cd3131
terminal.ansiWhite #555555
terminal.ansiYellow #949800
terminal.border #99999932
terminal.foreground #333333
terminal.selectionBackground #d3d3d340
terminalCursor.background #686868
terminalCursor.foreground #ffffff
textLink.foreground #ff9b00
titleBar.activeBackground #ffffff
titleBar.activeForeground #000000
titleBar.border #00000000
titleBar.inactiveBackground #ffffff
titleBar.inactiveForeground #00000099
tree.indentGuidesStroke #e2e2e2
walkThrough.embeddedEditorBackground #00000050
widget.shadow #4f4f4f2a #ff3040
punctuation.separator.period.python,punctuation.separator.element.python,punctuation.parenthesis.begin.python,punctuation.parenthesis.end.python #000000 —
variable.parameter.function.language.special.self.python #ffa600 —
storage.modifier.lifetime.rust #000000 —
support.function.std.rust #008cff —
entity.name.lifetime.rust #ffa600 —
variable.language.rust #ff3040 —
support.constant.edge #c500ff —
constant.other.character-class.regexp #ff3040 —
keyword.operator.quantifier.regexp #ff7c00 —
punctuation.definition.string.begin,punctuation.definition.string.end #5bd900 —
variable.parameter.function #000000 —
comment markup.link #454e5e —
markup.changed.diff #ffa600 —
meta.diff.header.from-file,meta.diff.header.to-file,punctuation.definition.from-file.diff,punctuation.definition.to-file.diff #008cff —
markup.inserted.diff #5bd900 —
markup.deleted.diff #ff3040 —
meta.function.c,meta.function.cpp #ff3040 —
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 #000000 —
punctuation.separator.key-value #000000 —
keyword.operator.expression.import #008cff —
support.constant.math #ffa600 —
support.constant.property.math #ff7c00 —
variable.other.constant #ffa600 —
storage.type.annotation.java, storage.type.object.array.java #ffa600 —
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 #000000 —
storage.modifier.import.java,storage.type.java,storage.type.generic.java #ffa600 —
keyword.operator.instanceof.java #c500ff —
meta.definition.variable.name.java #ff3040 —
keyword.operator.logical #00545e —
keyword.operator.bitwise #00545e —
keyword.operator.channel #00545e —
support.constant.property-value.scss,support.constant.property-value.css #ff7c00 —
keyword.operator.css,keyword.operator.scss,keyword.operator.less #00545e —
support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss #ff7c00 —
punctuation.separator.list.comma.css #000000 —
support.constant.color.w3c-standard-color-name.css #ff7c00 —
support.type.vendored.property-name.css #00545e —
support.module.node,support.type.object.module,support.module.node #ffa600 —
entity.name.type.module #ffa600 —
variable.other.readwrite,meta.object-literal.key,support.variable.property,support.variable.object.process,support.variable.object.node #ff3040 —
support.constant.json #ff7c00 —
keyword.operator.expression.instanceof, keyword.operator.new, keyword.operator.ternary, keyword.operator.optional, keyword.operator.expression.keyof #c500ff —
support.type.object.console #ff3040 —
support.variable.property.process #ff7c00 —
entity.name.function,support.function.console #008cff —
keyword.operator.misc.rust #000000 —
keyword.operator.sigil.rust #c500ff —
keyword.operator.delete #c500ff —
support.type.object.dom #00545e —
support.variable.dom,support.variable.property.dom #ff3040 —
keyword.operator.arithmetic,keyword.operator.comparison,keyword.operator.decrement,keyword.operator.increment,keyword.operator.relational #00545e —
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 #c500ff —
punctuation.separator.delimiter #000000 —
punctuation.separator.c,punctuation.separator.cpp #c500ff —
support.type.posix-reserved.c,support.type.posix-reserved.cpp #00545e —
keyword.operator.sizeof.c,keyword.operator.sizeof.cpp #c500ff —
variable.parameter.function.language.python #ff7c00 —
support.type.python #00545e —
keyword.operator.logical.python #c500ff —
variable.parameter.function.python #ff7c00 —
punctuation.definition.arguments.begin.python,punctuation.definition.arguments.end.python,punctuation.separator.arguments.python,punctuation.definition.list.begin.python,punctuation.definition.list.end.python #000000 —
meta.function-call.generic.python #008cff —
constant.character.format.placeholder.other.python #ff7c00 —
keyword.operator.assignment.compound #c500ff —
keyword.operator.assignment.compound.js,keyword.operator.assignment.compound.ts #00545e —
entity.name.namespace #ffa600 —
variable.language #ffa600 —
token.variable.parameter.java #000000 —
import.storage.java #ffa600 —
token.package.keyword #c500ff —
entity.name.function, meta.require, support.function.any-method, variable.function #008cff —
entity.name.type.namespace #ffa600 —
support.class, entity.name.type.class #ffa600 —
entity.name.class.identifier.namespace.type #ffa600 —
entity.name.class, variable.other.class.js, variable.other.class.ts #ffa600 —
variable.other.class.php #ff3040 —
control.elements, keyword.operator.less #ff7c00 —
keyword.other.special-method #008cff —
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 #c500ff —
token.storage.type.java #ffa600 —
support.type.property-name #000000 —
support.constant.property-value #000000 —
support.constant.font-name #ff7c00 —
entity.other.inherited-class #ffa600 —
constant.other.symbol #00545e —
punctuation.definition.constant #ff7c00 —
entity.other.attribute-name #ff7c00 —
entity.other.attribute-name.id #008cff normal
entity.other.attribute-name.class.css #ff7c00 normal
markup.heading punctuation.definition.heading, entity.name.section #008cff —
keyword.other.unit #ff3040 —
markup.bold,todo.bold #ff7c00 —
punctuation.definition.bold #ffa600 —
markup.italic, punctuation.definition.italic,todo.emphasis #c500ff —
entity.name.section.markdown #ff3040 —
punctuation.definition.heading.markdown #ff3040 —
punctuation.definition.list.begin.markdown #ff3040 —
markup.heading.setext #000000 —
punctuation.definition.bold.markdown #ff7c00 —
markup.inline.raw.markdown #5bd900 —
markup.inline.raw.string.markdown #5bd900 —
punctuation.definition.list.markdown #ff3040 —
punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown #ff3040 —
beginning.punctuation.definition.list.markdown #ff3040 —
punctuation.definition.metadata.markdown #ff3040 —
markup.underline.link.markdown,markup.underline.link.image.markdown #c500ff —
string.other.link.title.markdown,string.other.link.description.markdown #008cff —
constant.character.escape #00545e —
punctuation.section.embedded, variable.interpolation #ff3040 —
punctuation.section.embedded.begin,punctuation.section.embedded.end #c500ff —
invalid.illegal.bad-ampersand.html #000000 —
invalid.deprecated #ffffff —
invalid.unimplemented #ffffff —
source.json meta.structure.dictionary.json > string.quoted.json #ff3040 —
source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string #ff3040 —
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 #5bd900 —
source.json meta.structure.dictionary.json > constant.language.json,source.json meta.structure.array.json > constant.language.json #00545e —
support.type.property-name.json #ff3040 —
support.type.property-name.json punctuation #ff3040 —
text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade #c500ff —
text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade #c500ff —
support.other.namespace.use.php,support.other.namespace.use-as.php,support.other.namespace.php,entity.other.alias.php,meta.interface.php #ffa600 —
keyword.operator.error-control.php #c500ff —
keyword.operator.type.php #c500ff —
punctuation.section.array.begin.php #000000 —
punctuation.section.array.end.php #000000 —
invalid.illegal.non-null-typehinted.php #f44747 —
storage.type.php,meta.other.type.phpdoc.php,keyword.other.type.php,keyword.other.array.phpdoc.php #ffa600 —
meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php #008cff —
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 #000000 —
support.constant.core.rust #ff7c00 —
support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php #ff7c00 —
entity.name.goto-label.php,support.other.php #008cff —
keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php #00545e —
keyword.operator.regexp.php #c500ff —
keyword.operator.comparison.php #00545e —
keyword.operator.heredoc.php,keyword.operator.nowdoc.php #c500ff —
meta.function.decorator.python #008cff —
support.token.decorator.python,meta.function.decorator.identifier.python #00545e —
function.parameter #000000 —
function.parameter.ruby, function.parameter.cs #000000 —
constant.language.symbol.ruby #00545e —
inline-color-decoration rgb-value #ff7c00 —
support.type.primitive.ts,support.type.builtin.ts,support.type.primitive.tsx,support.type.builtin.tsx #ffa600 —
block.scope.end,block.scope.begin #000000 —
entity.name.variable.local.cs #ff3040 —
token.error-token #f44747 —
token.debug-token #c500ff —
punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded #c500ff —
meta.template.expression #000000 —
keyword.operator.module #c500ff —
support.type.type.flowtype #008cff —
support.type.primitive #ffa600 —
meta.property.object #ff3040 —
variable.parameter.function.js #ff3040 —
keyword.other.template.begin #5bd900 —
keyword.other.template.end #5bd900 —
keyword.other.substitution.begin #5bd900 —
keyword.other.substitution.end #5bd900 —
keyword.operator.assignment #00545e —
keyword.operator.assignment.go #ffa600 —
keyword.operator.arithmetic.go, keyword.operator.address.go #c500ff —
entity.name.package.go #ffa600 —
support.type.prelude.elm #00545e —
support.constant.elm #ff7c00 —
punctuation.quasi.element #c500ff —
constant.character.entity #ff3040 —
entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class #00545e —
entity.global.clojure #ffa600 —
meta.symbol.clojure #ff3040 —
constant.keyword.clojure #00545e —
meta.arguments.coffee, variable.parameter.function.coffee #ff3040 —
meta.scope.prerequisites.makefile #ff3040 —
storage.modifier.import.groovy #ffa600 —
meta.method.groovy #008cff —
meta.definition.variable.name.groovy #ff3040 —
meta.definition.class.inherited.classes.groovy #5bd900 —
support.variable.semantic.hlsl #ffa600 —
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 #c500ff —
text.variable, text.bracketed #ff3040 —
support.type.swift, support.type.vb.asp #ffa600 —
entity.name.function.xi #ffa600 —
entity.name.class.xi #00545e —
constant.character.character-class.regexp.xi #ff3040 —
constant.regexp.xi #c500ff —
keyword.control.xi #00545e —
beginning.punctuation.definition.quote.markdown.xi #5bd900 —
beginning.punctuation.definition.list.markdown.xi #454e5e —
constant.character.xi #008cff —
constant.other.color.rgb-value.xi #ffffff —
punctuation.definition.tag.xi #454e5e —
entity.name.label.cs, entity.name.scope-resolution.function.call, entity.name.scope-resolution.function.definition #ffa600 —
entity.name.label.cs, markup.heading.setext.1.markdown, markup.heading.setext.2.markdown #ff3040 —
meta.brace.square #000000 —
comment, punctuation.definition.comment #454e5e italic
markup.quote.markdown #454e5e —
punctuation.definition.block.sequence.item.yaml #000000 —
constant.language.symbol.elixir #00545e —
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*
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 } !` ;
}