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 #45858700 activityBar.background #333333 activityBar.border #eadbb200 activityBar.foreground #458587 activityBar.inactiveForeground #eadbb266 activityBarBadge.background #45858700 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 #e27c77 — variable.other.generic-type.haskell #cb92db — storage.type.haskell #d79922 — support.variable.magic.python
Shiki preview TypeScript sample highlighted with this variant's colors and tokenColors.
activityBarBadge.foreground #458587
badge.background #4d4d4d
badge.foreground #e6e6e6
breadcrumb.activeSelectionForeground #e0e0e0
breadcrumb.background #282828
breadcrumb.focusForeground #e0e0e0
breadcrumb.foreground #cccccccc
button.background #458587
button.foreground #ffffff
button.hoverBackground #458587e1
button.secondaryBackground #4b4b4b
button.secondaryForeground #c7cfc7
button.secondaryHoverBackground #434343
checkbox.background #2c2c2c
checkbox.border #00000000
checkbox.foreground #cccccc
debugExceptionWidget.background #333333
debugExceptionWidget.border #474747
debugToolBar.background #333333
debugToolBar.border #474747
diffEditor.border #444444
diffEditor.insertedTextBackground #689d6933
diffEditor.removedTextBackground #cc231c33
dropdown.background #2c2c2c
dropdown.border #00000000
dropdown.foreground #cccccc
editor.background #282828
editor.findMatchBackground #515c6a
editor.findMatchBorder #74879f00
editor.findMatchHighlightBackground #ea5c0055
editor.findMatchHighlightBorder #ffffff00
editor.findRangeHighlightBackground #3a3d4166
editor.findRangeHighlightBorder #ffffff00
editor.foldBackground #264f784d
editor.foreground #eadbb2
editor.hoverHighlightBackground #264f7840
editor.inactiveSelectionBackground #3a3d41
editor.lineHighlightBackground #ffffff0A
editor.lineHighlightBorder #282828
editor.rangeHighlightBackground #ffffff0b
editor.rangeHighlightBorder #ffffff00
editor.selectionBackground #45858756
editor.selectionHighlightBackground #add6ff26
editor.selectionHighlightBorder #495f77
editor.wordHighlightBackground #575757b8
editor.wordHighlightStrongBackground #004972b8
editorBracketMatch.background #0064001a
editorBracketMatch.border #888888
editorCodeLens.foreground #999999
editorCursor.background #000000
editorCursor.foreground #aeafad
editorError.background #B73A3400
editorError.border #ffffff00
editorError.foreground #cc231c
editorGroup.border #444444
editorGroup.emptyBackground #282828
editorGroupHeader.tabsBackground #252526
editorGutter.addedBackground #689d69
editorGutter.background #282828
editorGutter.commentRangeForeground #c5c5c5
editorGutter.deletedBackground #cc231c
editorGutter.foldingControlForeground #c5c5c5
editorGutter.modifiedBackground #458587
editorHoverWidget.background #252526
editorHoverWidget.border #454545
editorHoverWidget.foreground #eadbb2
editorIndentGuide.activeBackground #707070
editorIndentGuide.background #404040
editorInfo.background #4490BF00
editorInfo.border #4490BF00
editorInfo.foreground #458587
editorLineNumber.activeForeground #c6c6c6
editorLineNumber.foreground #858585
editorLink.activeForeground #83e3e6
editorMarkerNavigation.background #2d2d30
editorMarkerNavigationError.background #cc231c60
editorMarkerNavigationInfo.background #45858760
editorMarkerNavigationWarning.background #d7992260
editorOverviewRuler.background #25252500
editorOverviewRuler.border #7f7f7f4d
editorRuler.foreground #5a5a5a
editorSuggestWidget.background #252526
editorSuggestWidget.border #454545
editorSuggestWidget.foreground #eadbb2d3
editorSuggestWidget.highlightForeground #458587
editorSuggestWidget.selectedBackground #45858742
editorWarning.background #A9904000
editorWarning.border #ffffff00
editorWarning.foreground #d79922
editorWhitespace.foreground #e3e4e229
editorWidget.background #252526
editorWidget.foreground #cccccc
editorWidget.resizeBorder #5F5F5F
focusBorder #458587
foreground #eadbb2
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 #eadbb2
input.background #2c2c2c
input.border #00000000
input.foreground #cccccc
input.placeholderForeground #a6a6a6
inputOption.activeBackground #45858766
inputOption.activeBorder #007acc00
inputOption.activeForeground #3f3f3f
list.activeSelectionBackground #45858766
list.activeSelectionForeground #ffffff
list.dropBackground #689d6960
list.focusBackground #45858750
list.focusForeground #ffffff
list.highlightForeground #458587
list.hoverBackground #282828
list.hoverForeground #458587
list.inactiveSelectionBackground #d799221a
list.inactiveSelectionForeground #689d69
listFilterWidget.background #cc231c58
listFilterWidget.noMatchesOutline #cc231c
listFilterWidget.outline #00000000
menu.background #1f1f1f
menu.border #00000085
menu.foreground #eadbb2cc
menu.selectionBackground #458587
menu.selectionBorder #00000000
menu.selectionForeground #ffffff
menu.separatorBackground #eadbb2cc
menubar.selectionBackground #ffffff1a
menubar.selectionBorder #eadbb2
menubar.selectionForeground #eadbb299
merge.commonContentBackground #282828
merge.commonHeaderBackground #383838
merge.currentContentBackground #27403b
merge.currentHeaderBackground #689d69ab
merge.incomingContentBackground #458587eb
merge.incomingHeaderBackground #458587ab
minimap.background #282828
minimap.errorHighlight #cc231c
minimap.findMatchHighlight #515c6a
minimap.selectionHighlight #45858756
minimap.warningHighlight #d79922
minimapGutter.addedBackground #689d69
minimapGutter.deletedBackground #cc231c
minimapGutter.modifiedBackground #458587
notificationCenter.border #474747
notificationCenterHeader.background #303031
notificationCenterHeader.foreground #cccccc
notifications.background #252526
notifications.border #303031
notifications.foreground #cccccc
notificationsErrorIcon.foreground #f48771
notificationsInfoIcon.foreground #75beff
notificationsWarningIcon.foreground #cca700
notificationToast.border #474747
panel.background #282828
panel.border #80808059
panelSection.border #80808059
panelTitle.activeBorder #e7e7e7
panelTitle.activeForeground #e7e7e7
panelTitle.inactiveForeground #e7e7e799
peekView.border #4585879b
peekViewEditor.background #45858722
peekViewEditor.matchHighlightBackground #ff8f0044
peekViewEditor.matchHighlightBorder #ee931e00
peekViewEditorGutter.background #45858722
peekViewResult.background #282828
peekViewResult.fileForeground #eadbb2
peekViewResult.lineForeground #bbbbbb
peekViewResult.matchHighlightBackground #ea5c004d
peekViewResult.selectionBackground #3399ff33
peekViewResult.selectionForeground #eadbb2
peekViewTitle.background #1e1e1e
peekViewTitleDescription.foreground #ccccccb3
peekViewTitleLabel.foreground #eadbb2
pickerGroup.border #3f3f46
pickerGroup.foreground #3794ff
progressBar.background #59a3a5
scrollbar.shadow #4d4d4d
scrollbarSlider.activeBackground #bfbfbf66
scrollbarSlider.background #79797966
scrollbarSlider.hoverBackground #646464b3
selection.background #315f60
settings.focusedRowBackground #ffffff07
settings.headerForeground #eadbb2
sideBar.background #1f1f1f
sideBar.border #eadbb200
sideBar.dropBackground #689d6960
sideBar.foreground #eadbb2
sideBarSectionHeader.background #1f1f1f
sideBarSectionHeader.border #eadbb200
sideBarSectionHeader.foreground #458587
sideBarTitle.foreground #458587
statusBar.background #458587
statusBar.border #eadbb200
statusBar.debuggingBackground #689d69
statusBar.debuggingBorder #ff000000
statusBar.debuggingForeground #eadbb2
statusBar.foreground #eadbb2
statusBar.noFolderBackground #cc231c80
statusBar.noFolderBorder #ff000000
statusBar.noFolderForeground #eadbb2
statusBarItem.activeBackground #FFFFFF25
statusBarItem.hoverBackground #d79922
statusBarItem.remoteBackground #689d69
statusBarItem.remoteForeground #eadbb2
tab.activeBackground #4585875a
tab.activeBorder #458587
tab.activeBorderTop #00000000
tab.activeForeground #d79922
tab.border #252526
tab.inactiveBackground #2d2d2d
tab.inactiveForeground #ffffff80
terminal.ansiBlack #000000
terminal.ansiBlue #2472c8
terminal.ansiBrightBlack #666666
terminal.ansiBrightBlue #3b8eea
terminal.ansiBrightCyan #29b8db
terminal.ansiBrightGreen #23d18b
terminal.ansiBrightMagenta #d670d6
terminal.ansiBrightRed #f14c4c
terminal.ansiBrightWhite #e5e5e5
terminal.ansiBrightYellow #f5f543
terminal.ansiCyan #11a8cd
terminal.ansiGreen #0dbc79
terminal.ansiMagenta #bc3fbc
terminal.ansiRed #cd3131
terminal.ansiWhite #e5e5e5
terminal.ansiYellow #e5e510
terminal.border #80808059
terminal.foreground #cccccc
terminal.selectionBackground #bababa40
terminalCursor.background #458587
terminalCursor.foreground #eadbb2
textLink.foreground #458587
titleBar.activeBackground #3c3c3c
titleBar.activeForeground #ece4cd
titleBar.border #00000000
titleBar.inactiveBackground #3c3c3c99
titleBar.inactiveForeground #eadbb299
tree.indentGuidesStroke #585858
walkThrough.embeddedEditorBackground #00000050
widget.shadow #0000005c #e27c77
punctuation.separator.period.python,punctuation.separator.element.python,punctuation.parenthesis.begin.python,punctuation.parenthesis.end.python #eadbb2 —
variable.parameter.function.language.special.self.python #eadbb2 —
storage.modifier.lifetime.rust #eadbb2 —
support.function.std.rust #91e7ea —
entity.name.lifetime.rust #eadbb2 —
variable.language.rust #e27c77 —
support.constant.edge #cb92db —
constant.other.character-class.regexp #e27c77 —
keyword.operator.quantifier.regexp #d79922 —
punctuation.definition.string.begin,punctuation.definition.string.end #8fdb90 —
variable.parameter.function #eadbb2 —
comment markup.link #a39d96 —
markup.changed.diff #eadbb2 —
meta.diff.header.from-file,meta.diff.header.to-file,punctuation.definition.from-file.diff,punctuation.definition.to-file.diff #91e7ea —
markup.inserted.diff #8fdb90 —
markup.deleted.diff #e27c77 —
meta.function.c,meta.function.cpp #e27c77 —
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 #eadbb2 —
punctuation.separator.key-value #eadbb2 —
keyword.operator.expression.import #91e7ea —
support.constant.math #eadbb2 —
support.constant.property.math #d79922 —
variable.other.constant #eadbb2 —
storage.type.annotation.java, storage.type.object.array.java #eadbb2 —
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 #eadbb2 —
storage.modifier.import.java,storage.type.java,storage.type.generic.java #eadbb2 —
keyword.operator.instanceof.java #cb92db —
meta.definition.variable.name.java #e27c77 —
keyword.operator.logical #91e7ea —
keyword.operator.bitwise #91e7ea —
keyword.operator.channel #91e7ea —
support.constant.property-value.scss,support.constant.property-value.css #d79922 —
keyword.operator.css,keyword.operator.scss,keyword.operator.less #91e7ea —
support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss #d79922 —
punctuation.separator.list.comma.css #eadbb2 —
support.constant.color.w3c-standard-color-name.css #d79922 —
support.type.vendored.property-name.css #91e7ea —
support.module.node,support.type.object.module,support.module.node #eadbb2 —
entity.name.type.module #eadbb2 —
variable.other.readwrite,meta.object-literal.key,support.variable.property,support.variable.object.process,support.variable.object.node #e27c77 —
support.constant.json #d79922 —
keyword.operator.expression.instanceof, keyword.operator.new, keyword.operator.ternary, keyword.operator.optional, keyword.operator.expression.keyof #cb92db —
support.type.object.console #e27c77 —
support.variable.property.process #d79922 —
entity.name.function,support.function.console #91e7ea —
keyword.operator.misc.rust #eadbb2 —
keyword.operator.sigil.rust #cb92db —
keyword.operator.delete #cb92db —
support.type.object.dom #91e7ea —
support.variable.dom,support.variable.property.dom #e27c77 —
keyword.operator.arithmetic,keyword.operator.comparison,keyword.operator.decrement,keyword.operator.increment,keyword.operator.relational #91e7ea —
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 #cb92db —
punctuation.separator.delimiter #eadbb2 —
punctuation.separator.c,punctuation.separator.cpp #cb92db —
support.type.posix-reserved.c,support.type.posix-reserved.cpp #91e7ea —
keyword.operator.sizeof.c,keyword.operator.sizeof.cpp #cb92db —
variable.parameter.function.language.python #d79922 —
support.type.python #91e7ea —
keyword.operator.logical.python #cb92db —
variable.parameter.function.python #d79922 —
punctuation.definition.arguments.begin.python,punctuation.definition.arguments.end.python,punctuation.separator.arguments.python,punctuation.definition.list.begin.python,punctuation.definition.list.end.python #eadbb2 —
meta.function-call.generic.python #91e7ea —
constant.character.format.placeholder.other.python #d79922 —
keyword.operator.assignment.compound #cb92db —
keyword.operator.assignment.compound.js,keyword.operator.assignment.compound.ts #91e7ea —
entity.name.namespace #eadbb2 —
variable.language #eadbb2 —
token.variable.parameter.java #eadbb2 —
import.storage.java #eadbb2 —
token.package.keyword #cb92db —
entity.name.function, meta.require, support.function.any-method, variable.function #91e7ea —
entity.name.type.namespace #eadbb2 —
support.class, entity.name.type.class #eadbb2 —
entity.name.class.identifier.namespace.type #eadbb2 —
entity.name.class, variable.other.class.js, variable.other.class.ts #eadbb2 —
variable.other.class.php #e27c77 —
control.elements, keyword.operator.less #d79922 —
keyword.other.special-method #91e7ea —
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 #cb92db —
token.storage.type.java #eadbb2 —
support.type.property-name #eadbb2 —
support.constant.property-value #eadbb2 —
support.constant.font-name #d79922 —
entity.other.inherited-class #eadbb2 —
constant.other.symbol #91e7ea —
punctuation.definition.constant #d79922 —
entity.other.attribute-name #d79922 —
entity.other.attribute-name.id #91e7ea normal
entity.other.attribute-name.class.css #d79922 normal
markup.heading punctuation.definition.heading, entity.name.section #91e7ea —
keyword.other.unit #e27c77 —
markup.bold,todo.bold #d79922 —
punctuation.definition.bold #eadbb2 —
markup.italic, punctuation.definition.italic,todo.emphasis #cb92db —
entity.name.section.markdown #e27c77 —
punctuation.definition.heading.markdown #e27c77 —
punctuation.definition.list.begin.markdown #e27c77 —
markup.heading.setext #eadbb2 —
punctuation.definition.bold.markdown #d79922 —
markup.inline.raw.markdown #8fdb90 —
markup.inline.raw.string.markdown #8fdb90 —
punctuation.definition.list.markdown #e27c77 —
punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown #e27c77 —
beginning.punctuation.definition.list.markdown #e27c77 —
punctuation.definition.metadata.markdown #e27c77 —
markup.underline.link.markdown,markup.underline.link.image.markdown #cb92db —
string.other.link.title.markdown,string.other.link.description.markdown #91e7ea —
constant.character.escape #91e7ea —
punctuation.section.embedded, variable.interpolation #e27c77 —
punctuation.section.embedded.begin,punctuation.section.embedded.end #cb92db —
invalid.illegal.bad-ampersand.html #eadbb2 —
invalid.deprecated #ffffff —
invalid.unimplemented #ffffff —
source.json meta.structure.dictionary.json > string.quoted.json #e27c77 —
source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string #e27c77 —
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 #8fdb90 —
source.json meta.structure.dictionary.json > constant.language.json,source.json meta.structure.array.json > constant.language.json #91e7ea —
support.type.property-name.json #e27c77 —
support.type.property-name.json punctuation #e27c77 —
text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade #cb92db —
text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade #cb92db —
support.other.namespace.use.php,support.other.namespace.use-as.php,support.other.namespace.php,entity.other.alias.php,meta.interface.php #eadbb2 —
keyword.operator.error-control.php #cb92db —
keyword.operator.type.php #cb92db —
punctuation.section.array.begin.php #eadbb2 —
punctuation.section.array.end.php #eadbb2 —
invalid.illegal.non-null-typehinted.php #f44747 —
storage.type.php,meta.other.type.phpdoc.php,keyword.other.type.php,keyword.other.array.phpdoc.php #eadbb2 —
meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php #91e7ea —
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 #eadbb2 —
support.constant.core.rust #d79922 —
support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php #d79922 —
entity.name.goto-label.php,support.other.php #91e7ea —
keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php #91e7ea —
keyword.operator.regexp.php #cb92db —
keyword.operator.comparison.php #91e7ea —
keyword.operator.heredoc.php,keyword.operator.nowdoc.php #cb92db —
meta.function.decorator.python #91e7ea —
support.token.decorator.python,meta.function.decorator.identifier.python #91e7ea —
function.parameter #eadbb2 —
function.parameter.ruby, function.parameter.cs #eadbb2 —
constant.language.symbol.ruby #91e7ea —
inline-color-decoration rgb-value #d79922 —
support.type.primitive.ts,support.type.builtin.ts,support.type.primitive.tsx,support.type.builtin.tsx #eadbb2 —
block.scope.end,block.scope.begin #eadbb2 —
entity.name.variable.local.cs #e27c77 —
token.error-token #f44747 —
token.debug-token #cb92db —
punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded #cb92db —
meta.template.expression #eadbb2 —
keyword.operator.module #cb92db —
support.type.type.flowtype #91e7ea —
support.type.primitive #eadbb2 —
meta.property.object #e27c77 —
variable.parameter.function.js #e27c77 —
keyword.other.template.begin #8fdb90 —
keyword.other.template.end #8fdb90 —
keyword.other.substitution.begin #8fdb90 —
keyword.other.substitution.end #8fdb90 —
keyword.operator.assignment #91e7ea —
keyword.operator.assignment.go #eadbb2 —
keyword.operator.arithmetic.go, keyword.operator.address.go #cb92db —
entity.name.package.go #eadbb2 —
support.type.prelude.elm #91e7ea —
support.constant.elm #d79922 —
punctuation.quasi.element #cb92db —
constant.character.entity #e27c77 —
entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class #91e7ea —
entity.global.clojure #eadbb2 —
meta.symbol.clojure #e27c77 —
constant.keyword.clojure #91e7ea —
meta.arguments.coffee, variable.parameter.function.coffee #e27c77 —
meta.scope.prerequisites.makefile #e27c77 —
storage.modifier.import.groovy #eadbb2 —
meta.method.groovy #91e7ea —
meta.definition.variable.name.groovy #e27c77 —
meta.definition.class.inherited.classes.groovy #8fdb90 —
support.variable.semantic.hlsl #eadbb2 —
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 #cb92db —
text.variable, text.bracketed #e27c77 —
support.type.swift, support.type.vb.asp #eadbb2 —
entity.name.function.xi #eadbb2 —
entity.name.class.xi #91e7ea —
constant.character.character-class.regexp.xi #e27c77 —
constant.regexp.xi #cb92db —
keyword.control.xi #91e7ea —
beginning.punctuation.definition.quote.markdown.xi #8fdb90 —
beginning.punctuation.definition.list.markdown.xi #a39d96 —
constant.character.xi #91e7ea —
constant.other.color.rgb-value.xi #ffffff —
punctuation.definition.tag.xi #a39d96 —
entity.name.label.cs, entity.name.scope-resolution.function.call, entity.name.scope-resolution.function.definition #eadbb2 —
entity.name.label.cs, markup.heading.setext.1.markdown, markup.heading.setext.2.markdown #e27c77 —
meta.brace.square #eadbb2 —
comment, punctuation.definition.comment #a39d96 italic
markup.quote.markdown #a39d96 —
punctuation.definition.block.sequence.item.yaml #eadbb2 —
constant.language.symbol.elixir #91e7ea —
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 } !` ;
}
Golden Age | Coding Theme