Skip to main content
VS Code preview Full workbench mockup using this variant's colors and tokenColors.
colors Workbench UI color keys from the theme JSON colors map.
activityBar.background #1d1626 activityBar.foreground #ded7ea activityBar.inactiveForeground #ded7ea66 activityBarBadge.background #745898 activityBarBadge.foreground #ded7ea badge.background #745898 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 #e56c8a — variable.other.generic-type.haskell #c4a6ee — storage.type.haskell #d47e63 — support.variable.magic.python
Shiki preview TypeScript sample highlighted with this variant's colors and tokenColors.
Mountain Theme — Mountain Theme
badge.foreground
#ded7ea
breadcrumb.activeSelectionForeground #745898
breadcrumb.background #1d1626
breadcrumb.focusForeground #745898
breadcrumb.foreground #ded7ea
button.background #403053
button.foreground #ded7ea
button.hoverBackground #745898
button.secondaryBackground #1d1626
button.secondaryForeground #ded7ea
button.secondaryHoverBackground #745898
checkbox.background #1d1626
checkbox.border #00000000
checkbox.foreground #ded7ea
debugExceptionWidget.background #140f1a
debugExceptionWidget.border #403053
debugToolBar.background #140f1a
debugToolBar.border #403053
diffEditor.border #403053
diffEditor.insertedTextBackground #cecc0933
diffEditor.removedTextBackground #da2f5a33
dropdown.background #1d1626
dropdown.border #00000000
dropdown.foreground #ded7ea
editor.background #1d1626
editor.findMatchBackground #403053
editor.findMatchBorder #745898
editor.findMatchHighlightBackground #403053
editor.findMatchHighlightBorder #ffffff00
editor.findRangeHighlightBackground #40305366
editor.findRangeHighlightBorder #000000
editor.foldBackground #7458984d
editor.foreground #ded7ea
editor.hoverHighlightBackground #403053
editor.inactiveSelectionBackground #40305363
editor.lineHighlightBackground #4030530a
editor.lineHighlightBorder #7458986e
editor.rangeHighlightBackground #7458980b
editor.rangeHighlightBorder #ffffff00
editor.selectionBackground #403053
editor.selectionHighlightBackground #c4a6ee26
editor.selectionHighlightBorder #c4a6ee
editor.wordHighlightBackground #403053b8
editor.wordHighlightStrongBackground #403053b8
editorBracketMatch.background #4030530a
editorBracketMatch.border #745898
editorCodeLens.foreground #ded7ea6e
editorCursor.background #000000
editorCursor.foreground #aeafad
editorError.background #B73A3400
editorError.border #ffffff00
editorError.foreground #e56c8a
editorGroup.border #403053
editorGroup.emptyBackground #1d1626
editorGroupHeader.tabsBackground #140f1a
editorGutter.addedBackground #24bc50
editorGutter.background #1d1626
editorGutter.commentRangeForeground #ded7ea
editorGutter.deletedBackground #da2f5a
editorGutter.foldingControlForeground #ded7ea
editorGutter.modifiedBackground #00c0ff
editorHoverWidget.background #140f1a
editorHoverWidget.border #403053
editorHoverWidget.foreground #ded7ea
editorIndentGuide.activeBackground #ded7ea
editorIndentGuide.background #ded7ea
editorInfo.background #4490BF00
editorInfo.border #4490BF00
editorInfo.foreground #00c0ff
editorLineNumber.activeForeground #c6c6c6
editorLineNumber.foreground #858585
editorLink.activeForeground #e51fff
editorMarkerNavigation.background #140f1a
editorMarkerNavigationError.background #d47e63
editorMarkerNavigationInfo.background #99e6ff
editorMarkerNavigationWarning.background #f8f760
editorOverviewRuler.background #25252500
editorOverviewRuler.border #403053
editorRuler.foreground #00000000
editorSuggestWidget.background #140f1a
editorSuggestWidget.border #403053
editorSuggestWidget.foreground #ded7ea
editorSuggestWidget.highlightForeground #e51fff
editorSuggestWidget.selectedBackground #745898
editorWarning.background #A9904000
editorWarning.border #ffffff00
editorWarning.foreground #cecc09
editorWhitespace.foreground #ded7ea29
editorWidget.background #140f1a
editorWidget.foreground #ded7ea
editorWidget.resizeBorder #745898
focusBorder #00000000
foreground #ded7ea
gitDecoration.addedResourceForeground #61e186
gitDecoration.conflictingResourceForeground #00c0ff
gitDecoration.deletedResourceForeground #c15533
gitDecoration.ignoredResourceForeground #ded7ea
gitDecoration.modifiedResourceForeground #cecc09
gitDecoration.stageDeletedResourceForeground #d47e63
gitDecoration.stageModifiedResourceForeground #f8f760
gitDecoration.submoduleResourceForeground #99e6ff
gitDecoration.untrackedResourceForeground #61e186
icon.foreground #ded7ea
input.background #1d1626
input.border #00000000
input.foreground #ded7ea
input.placeholderForeground #ded7ea
inputOption.activeBackground #403053
inputOption.activeBorder #00000000
inputOption.activeForeground #ded7ea
list.activeSelectionBackground #403053
list.activeSelectionForeground #ded7ea
list.dropBackground #403053
list.focusBackground #403053
list.focusForeground #ded7ea
list.highlightForeground #e51fff
list.hoverBackground #403053
list.hoverForeground #ded7ea
list.inactiveSelectionBackground #403053
list.inactiveSelectionForeground #ded7ea
listFilterWidget.background #403053
listFilterWidget.noMatchesOutline #745898
listFilterWidget.outline #00000000
menu.background #140f1a
menu.border #140f1a85
menu.foreground #ded7ea
menu.selectionBackground #403053
menu.selectionBorder #00000000
menu.selectionForeground #ded7ea
menu.separatorBackground #ded7ea
menubar.selectionBackground #403053
menubar.selectionForeground #ded7ea
merge.commonContentBackground #945ee0
merge.commonHeaderBackground #8142db
merge.currentContentBackground #167632
merge.currentHeaderBackground #1b8c3b
merge.incomingContentBackground #006c8f
merge.incomingHeaderBackground #0084af
minimap.background #1d1626
minimap.errorHighlight #e56c8a
minimap.findMatchHighlight #403053
minimap.selectionHighlight #403053
minimap.warningHighlight #cecc09
minimapGutter.addedBackground #24bc50
minimapGutter.deletedBackground #da2f5a
minimapGutter.modifiedBackground #00c0ff
notificationCenter.border #745898
notificationCenterHeader.background #403053
notificationCenterHeader.foreground #ded7ea
notifications.background #140f1a
notifications.border #403053
notifications.foreground #ded7ea
notificationsErrorIcon.foreground #e56c8a
notificationsInfoIcon.foreground #99e6ff
notificationsWarningIcon.foreground #f8f760
notificationToast.border #745898
panel.background #1d1626
panel.border #74589859
panelSection.border #74589859
panelTitle.activeBorder #745898
panelTitle.activeForeground #ded7ea
panelTitle.inactiveForeground #ded7ea99
peekView.border #403053
peekViewEditor.background #140f1a
peekViewEditor.matchHighlightBackground #745898
peekViewEditor.matchHighlightBorder #403053
peekViewEditorGutter.background #140f1a
peekViewResult.background #140f1a
peekViewResult.fileForeground #ded7ea
peekViewResult.lineForeground #ded7ea
peekViewResult.matchHighlightBackground #745898
peekViewResult.selectionBackground #745898
peekViewResult.selectionForeground #ded7ea
peekViewTitle.background #403053
peekViewTitleDescription.foreground #ded7ea
peekViewTitleLabel.foreground #ded7ea
pickerGroup.border #00000000
pickerGroup.foreground #e51fff
progressBar.background #745898
scrollbar.shadow #00000000
scrollbarSlider.activeBackground #ded7ea66
scrollbarSlider.background #ded7ea66
scrollbarSlider.hoverBackground #ded7eab3
selection.background #403053
settings.focusedRowBackground #ffffff07
settings.headerForeground #ded7ea
sideBar.background #140f1a
sideBar.dropBackground #403053
sideBar.foreground #ded7ea
sideBarSectionHeader.background #00000000
sideBarSectionHeader.border #ded7ea33
sideBarSectionHeader.foreground #ded7ea
sideBarTitle.foreground #ded7ea
statusBar.background #140f1a
statusBar.debuggingBackground #d47e63
statusBar.debuggingForeground #ded7ea
statusBar.foreground #ded7ea
statusBar.noFolderBackground #a77ce4
statusBar.noFolderForeground #ded7ea
statusBarItem.activeBackground #FFFFFF25
statusBarItem.hoverBackground #7458981f
statusBarItem.remoteBackground #403053
statusBarItem.remoteForeground #ded7ea
tab.activeBackground #1d1626
tab.activeBorder #00000000
tab.activeBorderTop #00000000
tab.activeForeground #ded7ea
tab.border #00000000
tab.hoverBackground #1d1626
tab.inactiveBackground #140f1a
tab.inactiveForeground #ded7ea
terminal.ansiBlack #000000
terminal.ansiBlue #00c0ff
terminal.ansiBrightBlack #666666
terminal.ansiBrightBlue #99e6ff
terminal.ansiBrightCyan #04f1ca
terminal.ansiBrightGreen #61e186
terminal.ansiBrightMagenta #ef7dfe
terminal.ansiBrightRed #e56c8a
terminal.ansiBrightWhite #ded7ea
terminal.ansiBrightYellow #f8f760
terminal.ansiCyan #2dfcda
terminal.ansiGreen #24bc50
terminal.ansiMagenta #e51fff
terminal.ansiRed #da2f5a
terminal.ansiWhite #ded7ea
terminal.ansiYellow #cecc09
terminal.border #74589859
terminal.foreground #ded7ea
terminal.selectionBackground #40305340
terminalCursor.background #ded7ea90
terminalCursor.foreground #ded7ea
textLink.foreground #e51fff
titleBar.activeBackground #140f1a
titleBar.activeForeground #ded7ea
titleBar.border #00000000
titleBar.inactiveBackground #140f1a99
titleBar.inactiveForeground #ded7ea99
tree.indentGuidesStroke #ded7ea
walkThrough.embeddedEditorBackground #00000050
widget.shadow #0000005c #e56c8a
punctuation.separator.period.python,punctuation.separator.element.python,punctuation.parenthesis.begin.python,punctuation.parenthesis.end.python #ded7ea —
variable.parameter.function.language.special.self.python #cecc09 —
storage.modifier.lifetime.rust #ded7ea —
support.function.std.rust #99e6ff —
entity.name.lifetime.rust #cecc09 —
variable.language.rust #e56c8a —
support.constant.edge #c4a6ee —
constant.other.character-class.regexp #e56c8a —
keyword.operator.quantifier.regexp #d47e63 —
punctuation.definition.string.begin,punctuation.definition.string.end #61e186 —
variable.parameter.function #ded7ea —
comment markup.link #745898 —
markup.changed.diff #cecc09 —
meta.diff.header.from-file,meta.diff.header.to-file,punctuation.definition.from-file.diff,punctuation.definition.to-file.diff #99e6ff —
markup.inserted.diff #61e186 —
markup.deleted.diff #e56c8a —
meta.function.c,meta.function.cpp #e56c8a —
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 #ded7ea —
punctuation.separator.key-value #ded7ea —
keyword.operator.expression.import #99e6ff —
support.constant.math #cecc09 —
support.constant.property.math #d47e63 —
variable.other.constant #cecc09 —
storage.type.annotation.java, storage.type.object.array.java #cecc09 —
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 #ded7ea —
storage.modifier.import.java,storage.type.java,storage.type.generic.java #cecc09 —
keyword.operator.instanceof.java #c4a6ee —
meta.definition.variable.name.java #e56c8a —
keyword.operator.logical #00c0ff —
keyword.operator.bitwise #00c0ff —
keyword.operator.channel #00c0ff —
support.constant.property-value.scss,support.constant.property-value.css #d47e63 —
keyword.operator.css,keyword.operator.scss,keyword.operator.less #00c0ff —
support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss #d47e63 —
punctuation.separator.list.comma.css #ded7ea —
support.constant.color.w3c-standard-color-name.css #d47e63 —
support.type.vendored.property-name.css #00c0ff —
support.module.node,support.type.object.module,support.module.node #cecc09 —
entity.name.type.module #cecc09 —
variable.other.readwrite,meta.object-literal.key,support.variable.property,support.variable.object.process,support.variable.object.node #e56c8a —
support.constant.json #d47e63 —
keyword.operator.expression.instanceof, keyword.operator.new, keyword.operator.ternary, keyword.operator.optional, keyword.operator.expression.keyof #c4a6ee —
support.type.object.console #e56c8a —
support.variable.property.process #d47e63 —
entity.name.function,support.function.console #99e6ff —
keyword.operator.misc.rust #ded7ea —
keyword.operator.sigil.rust #c4a6ee —
keyword.operator.delete #c4a6ee —
support.type.object.dom #00c0ff —
support.variable.dom,support.variable.property.dom #e56c8a —
keyword.operator.arithmetic,keyword.operator.comparison,keyword.operator.decrement,keyword.operator.increment,keyword.operator.relational #00c0ff —
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 #c4a6ee —
punctuation.separator.delimiter #ded7ea —
punctuation.separator.c,punctuation.separator.cpp #c4a6ee —
support.type.posix-reserved.c,support.type.posix-reserved.cpp #00c0ff —
keyword.operator.sizeof.c,keyword.operator.sizeof.cpp #c4a6ee —
variable.parameter.function.language.python #d47e63 —
support.type.python #00c0ff —
keyword.operator.logical.python #c4a6ee —
variable.parameter.function.python #d47e63 —
punctuation.definition.arguments.begin.python,punctuation.definition.arguments.end.python,punctuation.separator.arguments.python,punctuation.definition.list.begin.python,punctuation.definition.list.end.python #ded7ea —
meta.function-call.generic.python #99e6ff —
constant.character.format.placeholder.other.python #d47e63 —
keyword.operator.assignment.compound #c4a6ee —
keyword.operator.assignment.compound.js,keyword.operator.assignment.compound.ts #00c0ff —
entity.name.namespace #cecc09 —
variable.language #cecc09 —
token.variable.parameter.java #ded7ea —
import.storage.java #cecc09 —
token.package.keyword #c4a6ee —
entity.name.function, meta.require, support.function.any-method, variable.function #99e6ff —
entity.name.type.namespace #cecc09 —
support.class, entity.name.type.class #cecc09 —
entity.name.class.identifier.namespace.type #cecc09 —
entity.name.class, variable.other.class.js, variable.other.class.ts #cecc09 —
variable.other.class.php #e56c8a —
control.elements, keyword.operator.less #d47e63 —
keyword.other.special-method #99e6ff —
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 #c4a6ee —
token.storage.type.java #cecc09 —
support.type.property-name #ded7ea —
support.constant.property-value #ded7ea —
support.constant.font-name #d47e63 —
entity.other.inherited-class #cecc09 —
constant.other.symbol #00c0ff —
punctuation.definition.constant #d47e63 —
entity.other.attribute-name #d47e63 —
entity.other.attribute-name.id #99e6ff normal
entity.other.attribute-name.class.css #d47e63 normal
markup.heading punctuation.definition.heading, entity.name.section #99e6ff —
keyword.other.unit #e56c8a —
markup.bold,todo.bold #d47e63 —
punctuation.definition.bold #cecc09 —
markup.italic, punctuation.definition.italic,todo.emphasis #c4a6ee —
entity.name.section.markdown #e56c8a —
punctuation.definition.heading.markdown #e56c8a —
punctuation.definition.list.begin.markdown #e56c8a —
markup.heading.setext #ded7ea —
punctuation.definition.bold.markdown #d47e63 —
markup.inline.raw.markdown #61e186 —
markup.inline.raw.string.markdown #61e186 —
punctuation.definition.list.markdown #e56c8a —
punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown #e56c8a —
beginning.punctuation.definition.list.markdown #e56c8a —
punctuation.definition.metadata.markdown #e56c8a —
markup.underline.link.markdown,markup.underline.link.image.markdown #c4a6ee —
string.other.link.title.markdown,string.other.link.description.markdown #99e6ff —
constant.character.escape #00c0ff —
punctuation.section.embedded, variable.interpolation #e56c8a —
punctuation.section.embedded.begin,punctuation.section.embedded.end #c4a6ee —
invalid.illegal.bad-ampersand.html #ded7ea —
invalid.deprecated #ffffff —
invalid.unimplemented #ffffff —
source.json meta.structure.dictionary.json > string.quoted.json #e56c8a —
source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string #e56c8a —
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 #61e186 —
source.json meta.structure.dictionary.json > constant.language.json,source.json meta.structure.array.json > constant.language.json #00c0ff —
support.type.property-name.json #e56c8a —
support.type.property-name.json punctuation #e56c8a —
text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade #c4a6ee —
text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade #c4a6ee —
support.other.namespace.use.php,support.other.namespace.use-as.php,support.other.namespace.php,entity.other.alias.php,meta.interface.php #cecc09 —
keyword.operator.error-control.php #c4a6ee —
keyword.operator.type.php #c4a6ee —
punctuation.section.array.begin.php #ded7ea —
punctuation.section.array.end.php #ded7ea —
invalid.illegal.non-null-typehinted.php #f44747 —
storage.type.php,meta.other.type.phpdoc.php,keyword.other.type.php,keyword.other.array.phpdoc.php #cecc09 —
meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php #99e6ff —
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 #ded7ea —
support.constant.core.rust #d47e63 —
support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php #d47e63 —
entity.name.goto-label.php,support.other.php #99e6ff —
keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php #00c0ff —
keyword.operator.regexp.php #c4a6ee —
keyword.operator.comparison.php #00c0ff —
keyword.operator.heredoc.php,keyword.operator.nowdoc.php #c4a6ee —
meta.function.decorator.python #99e6ff —
support.token.decorator.python,meta.function.decorator.identifier.python #00c0ff —
function.parameter #ded7ea —
function.parameter.ruby, function.parameter.cs #ded7ea —
constant.language.symbol.ruby #00c0ff —
inline-color-decoration rgb-value #d47e63 —
support.type.primitive.ts,support.type.builtin.ts,support.type.primitive.tsx,support.type.builtin.tsx #cecc09 —
block.scope.end,block.scope.begin #ded7ea —
entity.name.variable.local.cs #e56c8a —
token.error-token #f44747 —
token.debug-token #c4a6ee —
punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded #c4a6ee —
meta.template.expression #ded7ea —
keyword.operator.module #c4a6ee —
support.type.type.flowtype #99e6ff —
support.type.primitive #cecc09 —
meta.property.object #e56c8a —
variable.parameter.function.js #e56c8a —
keyword.other.template.begin #61e186 —
keyword.other.template.end #61e186 —
keyword.other.substitution.begin #61e186 —
keyword.other.substitution.end #61e186 —
keyword.operator.assignment #00c0ff —
keyword.operator.assignment.go #cecc09 —
keyword.operator.arithmetic.go, keyword.operator.address.go #c4a6ee —
entity.name.package.go #cecc09 —
support.type.prelude.elm #00c0ff —
support.constant.elm #d47e63 —
punctuation.quasi.element #c4a6ee —
constant.character.entity #e56c8a —
entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class #00c0ff —
entity.global.clojure #cecc09 —
meta.symbol.clojure #e56c8a —
constant.keyword.clojure #00c0ff —
meta.arguments.coffee, variable.parameter.function.coffee #e56c8a —
meta.scope.prerequisites.makefile #e56c8a —
storage.modifier.import.groovy #cecc09 —
meta.method.groovy #99e6ff —
meta.definition.variable.name.groovy #e56c8a —
meta.definition.class.inherited.classes.groovy #61e186 —
support.variable.semantic.hlsl #cecc09 —
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 #c4a6ee —
text.variable, text.bracketed #e56c8a —
support.type.swift, support.type.vb.asp #cecc09 —
entity.name.function.xi #cecc09 —
entity.name.class.xi #00c0ff —
constant.character.character-class.regexp.xi #e56c8a —
constant.regexp.xi #c4a6ee —
keyword.control.xi #00c0ff —
beginning.punctuation.definition.quote.markdown.xi #61e186 —
beginning.punctuation.definition.list.markdown.xi #745898 —
constant.character.xi #99e6ff —
constant.other.color.rgb-value.xi #ffffff —
punctuation.definition.tag.xi #745898 —
entity.name.label.cs, entity.name.scope-resolution.function.call, entity.name.scope-resolution.function.definition #cecc09 —
entity.name.label.cs, markup.heading.setext.1.markdown, markup.heading.setext.2.markdown #e56c8a —
meta.brace.square #ded7ea —
comment, punctuation.definition.comment #745898 italic
markup.quote.markdown #745898 —
punctuation.definition.block.sequence.item.yaml #ded7ea —
constant.language.symbol.elixir #00c0ff —
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 } !` ;
}
Mountain Theme | Coding Theme