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 #00000000 activityBar.activeBorder #00f900 activityBar.background #000000 activityBar.border #004703 activityBar.foreground #00f900 activityBar.inactiveForeground #00f90066 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 #51D5FD — variable.other.generic-type.haskell #75FF71 — storage.type.haskell #D19A66 — support.variable.magic.python
Shiki preview TypeScript sample highlighted with this variant's colors and tokenColors.
Homebrew Theme — Homebrew Color Theme
activityBarBadge.background
#00f900
activityBarBadge.foreground #000
badge.background #0f4d0e
badge.foreground #ffffff
breadcrumb.activeSelectionForeground #00f900
breadcrumb.background #000
breadcrumb.focusForeground #fff
breadcrumb.foreground #00f900
button.background #165e14
button.foreground #ffffff
button.hoverBackground #25a522
button.secondaryBackground #3a3d41
button.secondaryForeground #ffffff
button.secondaryHoverBackground #45494e
checkbox.background #262626
checkbox.border #00000000
checkbox.foreground #e2e2e2
debugExceptionWidget.background #333333
debugExceptionWidget.border #474747
debugToolBar.background #333333
debugToolBar.border #474747
diffEditor.border #444444
diffEditor.insertedTextBackground #9bb95533
diffEditor.removedTextBackground #ff000033
dropdown.background #262626
dropdown.border #00000000
dropdown.foreground #e2e2e2
editor.background #000000
editor.findMatchBackground #515c6a80
editor.findMatchBorder #74879f
editor.findMatchHighlightBackground #ea5c0055
editor.findMatchHighlightBorder #ffffff00
editor.findRangeHighlightBackground #3a3d4166
editor.findRangeHighlightBorder #ffffff00
editor.foldBackground #264f784d
editor.foreground #6ab9d1
editor.hoverHighlightBackground #264f7840
editor.inactiveSelectionBackground #3a3d41
editor.lineHighlightBackground #ffffff0a
editor.lineHighlightBorder #282828
editor.rangeHighlightBackground #ffffff0b
editor.rangeHighlightBorder #ffffff00
editor.selectionBackground #264f78
editor.selectionHighlightBackground #add6ff26
editor.selectionHighlightBorder #495f77
editor.wordHighlightBackground #575757b8
editor.wordHighlightStrongBackground #004972b8
editorBracketMatch.background #0064001a
editorBracketMatch.border #888888
editorCodeLens.foreground #999999
editorError.background #b73a3400
editorError.border #ffffff00
editorError.foreground #f48771
editorGroup.border #444444
editorGroup.emptyBackground #000000
editorGroupHeader.tabsBackground #000000
editorGroupHeader.tabsBorder #0f4d0e
editorGutter.addedBackground #587c0c
editorGutter.background #000000
editorGutter.commentRangeForeground #c5c5c5
editorGutter.deletedBackground #94151b
editorGutter.foldingControlForeground #c5c5c5
editorGutter.modifiedBackground #0c7d9d
editorHoverWidget.background #000
editorHoverWidget.border #00f900
editorHoverWidget.foreground #00f900
editorIndentGuide.activeBackground #00f900
editorIndentGuide.background #004703
editorInfo.background #4490bf00
editorInfo.border #4490bf00
editorInfo.foreground #75beff
editorLineNumber.activeForeground #00f900
editorLineNumber.foreground #004703
editorLink.activeForeground #4e94ce
editorMarkerNavigation.background #2d2d30
editorMarkerNavigationError.background #f48771
editorMarkerNavigationInfo.background #75beff
editorMarkerNavigationWarning.background #cca700
editorSuggestWidget.background #252526
editorSuggestWidget.border #454545
editorSuggestWidget.foreground #d4d4d4
editorSuggestWidget.highlightForeground #0097fb
editorSuggestWidget.selectedBackground #062f4a
editorWarning.background #a9904000
editorWarning.border #ffffff00
editorWarning.foreground #cca700
editorWhitespace.foreground #004703
editorWidget.background #052404
editorWidget.resizeBorder #00f900
focusBorder #00f900
foreground #00f900
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 #00f900
input.background #000000
input.border #004703
input.foreground #00f900
input.placeholderForeground #00f900
inputOption.activeBorder #00f900
inputOption.activeForeground #ffffff
list.activeSelectionBackground #004703
list.highlightForeground #75ff71
list.hoverBackground #004703
list.inactiveSelectionBackground #00470380
listFilterWidget.background #024f00
listFilterWidget.noMatchesOutline #15e40f
listFilterWidget.outline #00000000
menu.background #1b1b1b
menu.border #00000085
menu.foreground #c2c2c2
menu.selectionBackground #035a00
menu.selectionBorder #00000000
menu.selectionForeground #ffffff
menu.separatorBackground #bbbbbb
menubar.selectionBackground #ffffff1a
menubar.selectionBorder #000000
menubar.selectionForeground #75ff71
merge.commonContentBackground #282828
merge.commonHeaderBackground #383838
merge.currentContentBackground #27403b
merge.currentHeaderBackground #367366
merge.incomingContentBackground #28384b
merge.incomingHeaderBackground #395f8f
minimap.background #000000
minimap.errorHighlight #f48771
minimap.findMatchHighlight #515c6a
minimap.selectionHighlight #264f78
minimap.warningHighlight #cca700
minimapGutter.addedBackground #587c0c
minimapGutter.deletedBackground #94151b
minimapGutter.modifiedBackground #0c7d9d
notificationCenter.border #474747
notificationCenterHeader.background #303031
notificationCenterHeader.foreground #cccccc
notifications.background #252526
notifications.border #303031
notifications.foreground #cccccc
notificationsErrorIcon.foreground #f48771
notificationsInfoIcon.foreground #75beff
notificationsWarningIcon.foreground #cca700
notificationToast.border #474747
panel.background #000
panel.border #004703
panelSection.border #80808059
panelTitle.activeBorder #00f900
panelTitle.activeForeground #00f900
panelTitle.inactiveForeground #00f900
peekView.border #007acc
peekViewEditor.background #001f33
peekViewEditor.matchHighlightBackground #ff8f0099
peekViewEditor.matchHighlightBorder #ee931e
peekViewEditorGutter.background #001f33
peekViewResult.background #252526
peekViewResult.fileForeground #ffffff
peekViewResult.lineForeground #bbbbbb
peekViewResult.matchHighlightBackground #ea5c004d
peekViewResult.selectionBackground #3399ff33
peekViewResult.selectionForeground #ffffff
peekViewTitle.background #1e1e1e
peekViewTitleDescription.foreground #ccccccb3
peekViewTitleLabel.foreground #ffffff
pickerGroup.border #00470380
pickerGroup.foreground #3794ff
progressBar.background #75ff71
scrollbar.shadow #000000
scrollbarSlider.activeBackground #bfbfbf66
scrollbarSlider.background #79797966
scrollbarSlider.hoverBackground #646464b3
selection.background #666666
settings.focusedRowBackground #ffffff07
settings.headerForeground #75ff71
sideBar.background #000000
sideBar.border #004703
sideBar.dropBackground #383b3d
sideBar.foreground #ffffff
sideBarSectionHeader.background #00000000
sideBarSectionHeader.border #004703
sideBarSectionHeader.foreground #00f900
sideBarTitle.foreground #fff
statusBar.background #000000
statusBar.border #004703
statusBar.debuggingBackground #000000
statusBar.debuggingForeground #ff6000
statusBar.foreground #00f900
statusBar.noFolderBackground #000000
statusBar.noFolderForeground #00ffc2
statusBarItem.activeBackground #ffffff25
statusBarItem.hoverBackground #ffffff1f
statusBarItem.remoteBackground #000000
statusBarItem.remoteForeground #75ff71
tab.activeBackground #000
tab.activeBorder #000
tab.activeBorderTop #00f900
tab.activeForeground #00f900
tab.border #004703
tab.inactiveBackground #000000
tab.inactiveForeground #00f900
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 #ffffff40
terminalCursor.background #278424
terminalCursor.foreground #ffffff
textLink.foreground #75ff71
titleBar.activeBackground #000000
titleBar.activeForeground #00f900
titleBar.border #004703
titleBar.inactiveBackground #000000
titleBar.inactiveForeground #cccccc99
tree.indentGuidesStroke #00f900
walkThrough.embeddedEditorBackground #00000050
widget.shadow #0000005c #51D5FD
punctuation.separator.period.python,punctuation.separator.element.python,punctuation.parenthesis.begin.python,punctuation.parenthesis.end.python #6AB9D1 —
variable.parameter.function.language.special.self.python #E5C07B —
storage.modifier.lifetime.rust #6AB9D1 —
support.function.std.rust #58FF53 —
entity.name.lifetime.rust #E5C07B —
variable.language.rust #51D5FD —
support.constant.edge #75FF71 —
constant.other.character-class.regexp #51D5FD —
keyword.operator.quantifier.regexp #D19A66 —
punctuation.definition.string.begin,punctuation.definition.string.end #98C379 —
variable.parameter.function #6AB9D1 —
comment markup.link #7F848E —
markup.changed.diff #E5C07B —
meta.diff.header.from-file,meta.diff.header.to-file,punctuation.definition.from-file.diff,punctuation.definition.to-file.diff #58FF53 —
markup.inserted.diff #98C379 —
markup.deleted.diff #51D5FD —
meta.function.c,meta.function.cpp #51D5FD —
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 #6AB9D1 —
punctuation.separator.key-value #6AB9D1 —
keyword.operator.expression.import #58FF53 —
support.constant.math #E5C07B —
support.constant.property.math #D19A66 —
variable.other.constant #E5C07B —
storage.type.annotation.java, storage.type.object.array.java #E5C07B —
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 #6AB9D1 —
storage.modifier.import.java,storage.type.java,storage.type.generic.java #E5C07B —
keyword.operator.instanceof.java #75FF71 —
meta.definition.variable.name.java #51D5FD —
keyword.operator.logical #56B6C2 —
keyword.operator.bitwise #56B6C2 —
keyword.operator.channel #56B6C2 —
support.constant.property-value.scss,support.constant.property-value.css #D19A66 —
keyword.operator.css,keyword.operator.scss,keyword.operator.less #56B6C2 —
support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss #D19A66 —
punctuation.separator.list.comma.css #6AB9D1 —
support.constant.color.w3c-standard-color-name.css #D19A66 —
support.type.vendored.property-name.css #56B6C2 —
support.module.node,support.type.object.module,support.module.node #E5C07B —
entity.name.type.module #E5C07B —
variable.other.readwrite,meta.object-literal.key,support.variable.property,support.variable.object.process,support.variable.object.node #51D5FD —
support.constant.json #D19A66 —
keyword.operator.expression.instanceof, keyword.operator.new, keyword.operator.ternary, keyword.operator.optional, keyword.operator.expression.keyof #75FF71 —
support.type.object.console #51D5FD —
support.variable.property.process #D19A66 —
entity.name.function,support.function.console #58FF53 —
keyword.operator.misc.rust #6AB9D1 —
keyword.operator.sigil.rust #75FF71 —
keyword.operator.delete #75FF71 —
support.type.object.dom #56B6C2 —
support.variable.dom,support.variable.property.dom #51D5FD —
keyword.operator.arithmetic,keyword.operator.comparison,keyword.operator.decrement,keyword.operator.increment,keyword.operator.relational #56B6C2 —
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 #75FF71 —
punctuation.separator.delimiter #6AB9D1 —
punctuation.separator.c,punctuation.separator.cpp #75FF71 —
support.type.posix-reserved.c,support.type.posix-reserved.cpp #56B6C2 —
keyword.operator.sizeof.c,keyword.operator.sizeof.cpp #75FF71 —
variable.parameter.function.language.python #D19A66 —
support.type.python #56B6C2 —
keyword.operator.logical.python #75FF71 —
variable.parameter.function.python #D19A66 —
punctuation.definition.arguments.begin.python,punctuation.definition.arguments.end.python,punctuation.separator.arguments.python,punctuation.definition.list.begin.python,punctuation.definition.list.end.python #6AB9D1 —
meta.function-call.generic.python #58FF53 —
constant.character.format.placeholder.other.python #D19A66 —
keyword.operator.assignment.compound #75FF71 —
keyword.operator.assignment.compound.js,keyword.operator.assignment.compound.ts #56B6C2 —
entity.name.namespace #E5C07B —
variable.language #E5C07B —
token.variable.parameter.java #6AB9D1 —
import.storage.java #E5C07B —
token.package.keyword #75FF71 —
entity.name.function, meta.require, support.function.any-method, variable.function #58FF53 —
entity.name.type.namespace #E5C07B —
support.class, entity.name.type.class #E5C07B —
entity.name.class.identifier.namespace.type #E5C07B —
entity.name.class, variable.other.class.js, variable.other.class.ts #E5C07B —
variable.other.class.php #51D5FD —
control.elements, keyword.operator.less #D19A66 —
keyword.other.special-method #58FF53 —
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 #75FF71 —
token.storage.type.java #E5C07B —
support.type.property-name #6AB9D1 —
support.constant.property-value #6AB9D1 —
support.constant.font-name #D19A66 —
entity.other.inherited-class #E5C07B —
constant.other.symbol #56B6C2 —
punctuation.definition.constant #D19A66 —
entity.other.attribute-name #D19A66 —
entity.other.attribute-name.id #58FF53 italic
entity.other.attribute-name.class.css #D19A66 italic
markup.heading punctuation.definition.heading, entity.name.section #58FF53 —
keyword.other.unit #51D5FD —
markup.bold,todo.bold #D19A66 —
punctuation.definition.bold #E5C07B —
markup.italic, punctuation.definition.italic,todo.emphasis #75FF71 —
entity.name.section.markdown #51D5FD —
punctuation.definition.heading.markdown #51D5FD —
punctuation.definition.list.begin.markdown #51D5FD —
markup.heading.setext #6AB9D1 —
punctuation.definition.bold.markdown #D19A66 —
markup.inline.raw.markdown #98C379 —
markup.inline.raw.string.markdown #98C379 —
punctuation.definition.list.markdown #51D5FD —
punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown #51D5FD —
beginning.punctuation.definition.list.markdown #51D5FD —
punctuation.definition.metadata.markdown #51D5FD —
markup.underline.link.markdown,markup.underline.link.image.markdown #75FF71 —
string.other.link.title.markdown,string.other.link.description.markdown #58FF53 —
constant.character.escape #56B6C2 —
punctuation.section.embedded, variable.interpolation #51D5FD —
punctuation.section.embedded.begin,punctuation.section.embedded.end #75FF71 —
invalid.illegal.bad-ampersand.html #6AB9D1 —
invalid.deprecated #FFFFFF —
invalid.unimplemented #FFFFFF —
source.json meta.structure.dictionary.json > string.quoted.json #51D5FD —
source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string #51D5FD —
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 #98C379 —
source.json meta.structure.dictionary.json > constant.language.json,source.json meta.structure.array.json > constant.language.json #56B6C2 —
support.type.property-name.json #51D5FD —
support.type.property-name.json punctuation #51D5FD —
text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade #75FF71 —
text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade #75FF71 —
support.other.namespace.use.php,support.other.namespace.use-as.php,support.other.namespace.php,entity.other.alias.php,meta.interface.php #E5C07B —
keyword.operator.error-control.php #75FF71 —
keyword.operator.type.php #75FF71 —
punctuation.section.array.begin.php #6AB9D1 —
punctuation.section.array.end.php #6AB9D1 —
invalid.illegal.non-null-typehinted.php #F44747 —
storage.type.php,meta.other.type.phpdoc.php,keyword.other.type.php,keyword.other.array.phpdoc.php #E5C07B —
meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php #58FF53 —
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 #6AB9D1 —
support.constant.core.rust #D19A66 —
support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php #D19A66 —
entity.name.goto-label.php,support.other.php #58FF53 —
keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php #56B6C2 —
keyword.operator.regexp.php #75FF71 —
keyword.operator.comparison.php #56B6C2 —
keyword.operator.heredoc.php,keyword.operator.nowdoc.php #75FF71 —
meta.function.decorator.python #58FF53 —
support.token.decorator.python,meta.function.decorator.identifier.python #56B6C2 —
function.parameter #6AB9D1 —
function.parameter.ruby, function.parameter.cs #6AB9D1 —
constant.language.symbol.ruby #56B6C2 —
inline-color-decoration rgb-value #D19A66 —
support.type.primitive.ts,support.type.builtin.ts,support.type.primitive.tsx,support.type.builtin.tsx #E5C07B —
block.scope.end,block.scope.begin #6AB9D1 —
entity.name.variable.local.cs #51D5FD —
token.error-token #F44747 —
token.debug-token #75FF71 —
punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded #75FF71 —
meta.template.expression #6AB9D1 —
keyword.operator.module #75FF71 —
support.type.type.flowtype #58FF53 —
support.type.primitive #E5C07B —
meta.property.object #51D5FD —
variable.parameter.function.js #51D5FD —
keyword.other.template.begin #98C379 —
keyword.other.template.end #98C379 —
keyword.other.substitution.begin #98C379 —
keyword.other.substitution.end #98C379 —
keyword.operator.assignment #56B6C2 —
keyword.operator.assignment.go #E5C07B —
keyword.operator.arithmetic.go, keyword.operator.address.go #75FF71 —
entity.name.package.go #E5C07B —
support.type.prelude.elm #56B6C2 —
support.constant.elm #D19A66 —
punctuation.quasi.element #75FF71 —
constant.character.entity #51D5FD —
entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class #56B6C2 —
entity.global.clojure #E5C07B —
meta.symbol.clojure #51D5FD —
constant.keyword.clojure #56B6C2 —
meta.arguments.coffee, variable.parameter.function.coffee #51D5FD —
meta.scope.prerequisites.makefile #51D5FD —
storage.modifier.import.groovy #E5C07B —
meta.method.groovy #58FF53 —
meta.definition.variable.name.groovy #51D5FD —
meta.definition.class.inherited.classes.groovy #98C379 —
support.variable.semantic.hlsl #E5C07B —
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 #75FF71 —
text.variable, text.bracketed #51D5FD —
support.type.swift, support.type.vb.asp #E5C07B —
entity.name.function.xi #E5C07B —
entity.name.class.xi #56B6C2 —
constant.character.character-class.regexp.xi #51D5FD —
constant.regexp.xi #75FF71 —
keyword.control.xi #56B6C2 —
beginning.punctuation.definition.quote.markdown.xi #98C379 —
beginning.punctuation.definition.list.markdown.xi #7F848E —
constant.character.xi #58FF53 —
constant.other.color.rgb-value.xi #FFFFFF —
punctuation.definition.tag.xi #7F848E —
entity.name.label.cs, entity.name.scope-resolution.function.call, entity.name.scope-resolution.function.definition #E5C07B —
entity.name.label.cs, markup.heading.setext.1.markdown, markup.heading.setext.2.markdown #51D5FD —
meta.brace.square #6AB9D1 —
comment, punctuation.definition.comment #7F848E italic
markup.quote.markdown #7F848E —
punctuation.definition.block.sequence.item.yaml #6AB9D1 —
constant.language.symbol.elixir #56B6C2 —
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
punctuation.definition.comment #fff —
export interface User {
id : string ;
name : string ;
role : "admin" | "member" ;
tags : string [];
}
/**
* Fetch user data by ID
* @param id
* @returns User object or null if ID is invalid
*/
export async function fetchUser ( id : string ): Promise < User | null > {
if ( ! id ) {
return null ;
}
const response = await fetch ( `/api/users/ ${ id } ` , {
method : "GET" ,
headers : { Accept : "application/json" },
});
if ( ! response . ok ) {
throw new Error ( `HTTP ${ response . status } ` );
}
return ( await response . json ()) as User ;
}
function greet ( user : User ): string {
// Simple greeting function that uses the user's name
return `Hello, ${ user . name } !` ;
}
fetchUser.ts
index.ts
README.md
src
components
fetchUser.ts
src
components
fetchUser.ts
fetchUser 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Problems1
Output
Debug Console
Terminal
Ports
~/my-project $ pnpm dev
▲ Next.js ready on http://localhost:3000
✓ compiled client and server successfully in 412ms
wait - compiling /theme/vscode...
~/my-project
main*
Homebrew Theme | Coding Theme
Button.tsx
31
$
export interface User {
id : string ;
name : string ;
role : "admin" | "member" ;
tags : string [];
}
/**
* Fetch user data by ID
* @param id
* @returns User object or null if ID is invalid
*/
export async function fetchUser ( id : string ): Promise < User | null > {
if ( ! id ) {
return null ;
}
const response = await fetch ( `/api/users/ ${ id } ` , {
method : "GET" ,
headers : { Accept : "application/json" },
});
if ( ! response . ok ) {
throw new Error ( `HTTP ${ response . status } ` );
}
return ( await response . json ()) as User ;
}
function greet ( user : User ): string {
// Simple greeting function that uses the user's name
return `Hello, ${ user . name } !` ;
}