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 #000000 activityBar.background #000000 activityBar.border #000000 activityBar.foreground #ffef00 activityBar.inactiveForeground #ffffff activityBarBadge.background #1c00e0 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 #ff0014 — variable.other.generic-type.haskell #ff8300 — storage.type.haskell #ffffff — support.variable.magic.python
Shiki preview TypeScript sample highlighted with this variant's colors and tokenColors.
activityBarBadge.foreground
#ffffff
badge.background #000dcf
badge.foreground #ffffff
breadcrumb.activeSelectionForeground #ffffff
breadcrumb.background #000000
breadcrumb.focusForeground #ffffff
breadcrumb.foreground #ffffff
button.background #00860f
button.foreground #ffffff
button.hoverBackground #0071ff
button.secondaryBackground #606060
button.secondaryForeground #ffffff
button.secondaryHoverBackground #0071ff
checkbox.background #000000
checkbox.border #000000
checkbox.foreground #ffffff
debugExceptionWidget.background #000000
debugExceptionWidget.border #000000
debugToolBar.background #000000
debugToolBar.border #000000
diffEditor.border #a70000
diffEditor.insertedTextBackground #dfff0033
diffEditor.insertedTextBorder #ff000000
diffEditor.removedTextBackground #ff000033
dropdown.background #000000
dropdown.border #000000
dropdown.foreground #ffffff
editor.background #000000
editor.findMatchBackground #0070ff
editor.findMatchBorder #000000
editor.findMatchHighlightBackground #ff640055
editor.findMatchHighlightBorder #00000000
editor.findRangeHighlightBackground #0064ff66
editor.findRangeHighlightBorder #ffffff00
editor.foldBackground #0080ff4d
editor.foreground #ffffff
editor.hoverHighlightBackground #264f7840
editor.inactiveSelectionBackground #414141
editor.lineHighlightBackground #ffffff0a
editor.lineHighlightBorder #515151
editor.rangeHighlightBackground #ffffff0b
editor.rangeHighlightBorder #ffffff00
editor.selectionBackground #185a00
editor.selectionHighlightBackground #0040ff93
editor.selectionHighlightBorder #000000
editor.wordHighlightBackground #777777b8
editor.wordHighlightBorder #00000000
editor.wordHighlightStrongBackground #00a3ffb8
editorBracketMatch.background #69ff697e
editorBracketMatch.border #00000000
editorCodeLens.foreground #00ffdb
editorCursor.background #000000
editorCursor.foreground #ffffff
editorError.background #B73A3400
editorError.border #ffffff00
editorError.foreground #ff2b00
editorGroup.border #ababab
editorGroup.emptyBackground #000000
editorGroupHeader.border #000000
editorGroupHeader.tabsBackground #000000
editorGroupHeader.tabsBorder #000000
editorGutter.addedBackground #adff00
editorGutter.background #000000
editorGutter.commentRangeForeground #38ff00
editorGutter.deletedBackground #ff000c
editorGutter.foldingControlForeground #38ff00
editorGutter.modifiedBackground #00c7ff
editorHoverWidget.background #000000
editorHoverWidget.border #7b7b7b
editorHoverWidget.foreground #ffffff
editorIndentGuide.activeBackground #ffffff
editorIndentGuide.background #9f9f9f
editorInfo.background #4490BF00
editorInfo.border #4490BF00
editorInfo.foreground #0087ff
editorLineNumber.activeForeground #ffe300
editorLineNumber.foreground #7d7d7d
editorLink.activeForeground #008bff
editorMarkerNavigation.background #2d2d30
editorMarkerNavigationError.background #e62700
editorMarkerNavigationInfo.background #0087ff
editorMarkerNavigationWarning.background #ffd100
editorOverviewRuler.background #00000000
editorOverviewRuler.border #7f7f7f4d
editorRuler.foreground #000000
editorSuggestWidget.background #000000
editorSuggestWidget.border #b2a9a9a3
editorSuggestWidget.foreground #ffffff
editorSuggestWidget.highlightForeground #0099ff
editorSuggestWidget.selectedBackground #003f68
editorWarning.background #A9904000
editorWarning.border #ffffff00
editorWarning.foreground #ffd100
editorWhitespace.foreground #ffffff81
editorWidget.background #000000
editorWidget.foreground #ffffff
editorWidget.resizeBorder #ff0c0c
focusBorder #ffffff
foreground #ffffff
gitDecoration.addedResourceForeground #00ff2e
gitDecoration.conflictingResourceForeground #7e7eff
gitDecoration.deletedResourceForeground #ff2600
gitDecoration.ignoredResourceForeground #ff5400
gitDecoration.modifiedResourceForeground #ff9900
gitDecoration.stageDeletedResourceForeground #ff2600
gitDecoration.stageModifiedResourceForeground #ff9900
gitDecoration.submoduleResourceForeground #0084ff
gitDecoration.untrackedResourceForeground #ffffff
icon.foreground #ffffff
input.background #000000
input.border #000000
input.foreground #ffffff
input.placeholderForeground #969696
inputOption.activeBackground #00ff1c66
inputOption.activeBorder #00000000
inputOption.activeForeground #ffffff
list.activeSelectionBackground #000a99
list.activeSelectionForeground #ffffff
list.dropBackground #343434
list.focusBackground #4d4d4d
list.focusForeground #ffffff
list.highlightForeground #0099ff
list.hoverBackground #004d02
list.hoverForeground #ffffff
list.inactiveSelectionBackground #008202
list.inactiveSelectionForeground #ffffff
listFilterWidget.background #515151
listFilterWidget.noMatchesOutline #ff0000
listFilterWidget.outline #ffffff
menu.background #2e2e2e
menu.border #2e2e2e
menu.foreground #ffffff
menu.selectionBackground #004a7b
menu.selectionBorder #004a7b
menu.selectionForeground #ffffff
menu.separatorBackground #ffffff
menubar.selectionBackground #2e2e2e
menubar.selectionBorder #000000
menubar.selectionForeground #ffffff
merge.commonContentBackground #282828
merge.commonHeaderBackground #626262
merge.currentContentBackground #006450
merge.currentHeaderBackground #009676
merge.incomingContentBackground #003779
merge.incomingHeaderBackground #0061db
minimap.background #000000
minimap.errorHighlight #ff2b00
minimap.findMatchHighlight #0070ff
minimap.selectionHighlight #185a00
minimap.warningHighlight #ffd100
minimapGutter.addedBackground #adff00
minimapGutter.deletedBackground #ff000c
minimapGutter.modifiedBackground #00c7ff
notificationCenter.border #808080
notificationCenterHeader.background #000000
notificationCenterHeader.foreground #ffffff
notifications.background #000000
notifications.border #545454
notifications.foreground #ffffff
notificationsErrorIcon.foreground #ff2b00
notificationsInfoIcon.foreground #0087ff
notificationsWarningIcon.foreground #fffb00
notificationToast.border #000000
panel.background #000000
panel.border #ffffff59
panelSection.border #ffffff59
panelTitle.activeBorder #08ff00
panelTitle.activeForeground #ffffff
panelTitle.inactiveForeground #ffffffb1
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 #000000
pickerGroup.foreground #08ff00
progressBar.background #38ff00
scrollbar.shadow #000000
scrollbarSlider.activeBackground #ffd70066
scrollbarSlider.background #ffffff66
scrollbarSlider.hoverBackground #ffffffb3
selection.background #000000
settings.focusedRowBackground #ffffff07
settings.headerForeground #ffffff
sideBar.background #000000
sideBar.border #000000
sideBar.dropBackground #343434
sideBar.foreground #ffffff
sideBarSectionHeader.background #000000
sideBarSectionHeader.border #000000
sideBarSectionHeader.foreground #ffffff
sideBarTitle.foreground #ffffff
statusBar.background #000000
statusBar.border #000000
statusBar.debuggingBackground #000000
statusBar.debuggingBorder #000000
statusBar.debuggingForeground #ff0000
statusBar.foreground #ffffff
statusBar.noFolderBackground #000000
statusBar.noFolderBorder #000000
statusBar.noFolderForeground #ffffff
statusBarItem.activeBackground #FFFFFF25
statusBarItem.hoverBackground #000000
statusBarItem.remoteBackground #31e000
statusBarItem.remoteForeground #000000
tab.activeBackground #2d2d2d
tab.activeBorder #5cff00
tab.activeBorderTop #00000000
tab.activeForeground #ffffff
tab.border #000000
tab.hoverBackground #000e7d
tab.hoverBorder #ff0000
tab.hoverForeground #ffffff
tab.inactiveBackground #000000
tab.inactiveForeground #ffffff
terminal.ansiBlack #949494
terminal.ansiBlue #0079ff
terminal.ansiBrightBlack #949494
terminal.ansiBrightBlue #0079ff
terminal.ansiBrightCyan #00cdff
terminal.ansiBrightGreen #00ff98
terminal.ansiBrightMagenta #ff00ff
terminal.ansiBrightRed #ff0000
terminal.ansiBrightWhite #ffffff
terminal.ansiBrightYellow #ffff00
terminal.ansiCyan #00cdff
terminal.ansiGreen #00ff9d
terminal.ansiMagenta #ff00ff
terminal.ansiRed #ff0000
terminal.ansiWhite #e5e5e5
terminal.ansiYellow #ffff00
terminal.border #ffffff59
terminal.foreground #ffffff
terminal.selectionBackground #4fbe3f40
terminalCursor.background #00ff0491
terminalCursor.foreground #ffffff
textLink.foreground #ffd700
titleBar.activeBackground #000000
titleBar.activeForeground #ffffff
titleBar.border #00000000
titleBar.inactiveBackground #000000
titleBar.inactiveForeground #ffffffbf
tree.indentGuidesStroke #ffffff
walkThrough.embeddedEditorBackground #00000050
widget.shadow #20ff00ab #ff0014
punctuation.separator.period.python,punctuation.separator.element.python,punctuation.parenthesis.begin.python,punctuation.parenthesis.end.python #ffffff —
variable.parameter.function.language.special.self.python #5cff00 —
storage.modifier.lifetime.rust #ffffff —
support.function.std.rust #f7ff00 —
entity.name.lifetime.rust #5cff00 —
variable.language.rust #ff0014 —
support.constant.edge #ff8300 —
constant.other.character-class.regexp #ff0014 —
keyword.operator.quantifier.regexp #ffffff —
punctuation.definition.string.begin,punctuation.definition.string.end #9c4aff —
variable.parameter.function #ffffff —
comment markup.link #797979 —
markup.changed.diff #5cff00 —
meta.diff.header.from-file,meta.diff.header.to-file,punctuation.definition.from-file.diff,punctuation.definition.to-file.diff #f7ff00 —
markup.inserted.diff #9c4aff —
markup.deleted.diff #ff0014 —
meta.function.c,meta.function.cpp #ff0014 —
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 #ffffff —
punctuation.separator.key-value #ffffff —
keyword.operator.expression.import #f7ff00 —
support.constant.math #5cff00 —
support.constant.property.math #ffffff —
variable.other.constant #5cff00 —
storage.type.annotation.java, storage.type.object.array.java #5cff00 —
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 #ffffff —
storage.modifier.import.java,storage.type.java,storage.type.generic.java #5cff00 —
keyword.operator.instanceof.java #ff8300 —
meta.definition.variable.name.java #ff0014 —
keyword.operator.logical #00f3ff —
keyword.operator.bitwise #00f3ff —
keyword.operator.channel #00f3ff —
support.constant.property-value.scss,support.constant.property-value.css #ffffff —
keyword.operator.css,keyword.operator.scss,keyword.operator.less #00f3ff —
support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss #ffffff —
punctuation.separator.list.comma.css #ffffff —
support.constant.color.w3c-standard-color-name.css #ffffff —
support.type.vendored.property-name.css #00f3ff —
support.module.node,support.type.object.module,support.module.node #5cff00 —
entity.name.type.module #5cff00 —
variable.other.readwrite,meta.object-literal.key,support.variable.property,support.variable.object.process,support.variable.object.node #ff0014 —
support.constant.json #ffffff —
keyword.operator.expression.instanceof, keyword.operator.new, keyword.operator.ternary, keyword.operator.optional, keyword.operator.expression.keyof #ff8300 —
support.type.object.console #ff0014 —
support.variable.property.process #ffffff —
entity.name.function,support.function.console #f7ff00 —
keyword.operator.misc.rust #ffffff —
keyword.operator.sigil.rust #ff8300 —
keyword.operator.delete #ff8300 —
support.type.object.dom #00f3ff —
support.variable.dom,support.variable.property.dom #ff0014 —
keyword.operator.arithmetic,keyword.operator.comparison,keyword.operator.decrement,keyword.operator.increment,keyword.operator.relational #00f3ff —
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 #ff8300 —
punctuation.separator.delimiter #ffffff —
punctuation.separator.c,punctuation.separator.cpp #ff8300 —
support.type.posix-reserved.c,support.type.posix-reserved.cpp #00f3ff —
keyword.operator.sizeof.c,keyword.operator.sizeof.cpp #ff8300 —
variable.parameter.function.language.python #ffffff —
support.type.python #00f3ff —
keyword.operator.logical.python #ff8300 —
variable.parameter.function.python #ffffff —
punctuation.definition.arguments.begin.python,punctuation.definition.arguments.end.python,punctuation.separator.arguments.python,punctuation.definition.list.begin.python,punctuation.definition.list.end.python #ffffff —
meta.function-call.generic.python #f7ff00 —
constant.character.format.placeholder.other.python #ffffff —
keyword.operator.assignment.compound #ff8300 —
keyword.operator.assignment.compound.js,keyword.operator.assignment.compound.ts #00f3ff —
entity.name.namespace #5cff00 —
variable.language #5cff00 —
token.variable.parameter.java #ffffff —
import.storage.java #5cff00 —
token.package.keyword #ff8300 —
entity.name.function, meta.require, support.function.any-method, variable.function #f7ff00 —
entity.name.type.namespace #5cff00 —
support.class, entity.name.type.class #5cff00 —
entity.name.class.identifier.namespace.type #5cff00 —
entity.name.class, variable.other.class.js, variable.other.class.ts #5cff00 —
variable.other.class.php #ff0014 —
control.elements, keyword.operator.less #ffffff —
keyword.other.special-method #f7ff00 —
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 #ff8300 —
token.storage.type.java #5cff00 —
support.type.property-name #ffffff —
support.constant.property-value #ffffff —
support.constant.font-name #ffffff —
entity.other.inherited-class #5cff00 —
constant.other.symbol #00f3ff —
punctuation.definition.constant #ffffff —
entity.other.attribute-name #ffffff —
entity.other.attribute-name.id #f7ff00 normal
entity.other.attribute-name.class.css #ffffff normal
markup.heading punctuation.definition.heading, entity.name.section #f7ff00 —
keyword.other.unit #ff0014 —
markup.bold,todo.bold #ffffff —
punctuation.definition.bold #5cff00 —
markup.italic, punctuation.definition.italic,todo.emphasis #ff8300 —
entity.name.section.markdown #ff0014 —
punctuation.definition.heading.markdown #ff0014 —
punctuation.definition.list.begin.markdown #ff0014 —
markup.heading.setext #ffffff —
punctuation.definition.bold.markdown #ffffff —
markup.inline.raw.markdown #9c4aff —
markup.inline.raw.string.markdown #9c4aff —
punctuation.definition.list.markdown #ff0014 —
punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown #ff0014 —
beginning.punctuation.definition.list.markdown #ff0014 —
punctuation.definition.metadata.markdown #ff0014 —
markup.underline.link.markdown,markup.underline.link.image.markdown #ff8300 —
string.other.link.title.markdown,string.other.link.description.markdown #f7ff00 —
constant.character.escape #00f3ff —
punctuation.section.embedded, variable.interpolation #ff0014 —
punctuation.section.embedded.begin,punctuation.section.embedded.end #ff8300 —
invalid.illegal.bad-ampersand.html #ffffff —
invalid.deprecated #ffffff —
invalid.unimplemented #ffffff —
source.json meta.structure.dictionary.json > string.quoted.json #ff0014 —
source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string #ff0014 —
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 #9c4aff —
source.json meta.structure.dictionary.json > constant.language.json,source.json meta.structure.array.json > constant.language.json #00f3ff —
support.type.property-name.json #ff0014 —
support.type.property-name.json punctuation #ff0014 —
text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade #ff8300 —
text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade #ff8300 —
support.other.namespace.use.php,support.other.namespace.use-as.php,support.other.namespace.php,entity.other.alias.php,meta.interface.php #5cff00 —
keyword.operator.error-control.php #ff8300 —
keyword.operator.type.php #ff8300 —
punctuation.section.array.begin.php #ffffff —
punctuation.section.array.end.php #ffffff —
invalid.illegal.non-null-typehinted.php #f44747 —
storage.type.php,meta.other.type.phpdoc.php,keyword.other.type.php,keyword.other.array.phpdoc.php #5cff00 —
meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php #f7ff00 —
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 #ffffff —
support.constant.core.rust #ffffff —
support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php #ffffff —
entity.name.goto-label.php,support.other.php #f7ff00 —
keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php #00f3ff —
keyword.operator.regexp.php #ff8300 —
keyword.operator.comparison.php #00f3ff —
keyword.operator.heredoc.php,keyword.operator.nowdoc.php #ff8300 —
meta.function.decorator.python #f7ff00 —
support.token.decorator.python,meta.function.decorator.identifier.python #00f3ff —
function.parameter #ffffff —
function.parameter.ruby, function.parameter.cs #ffffff —
constant.language.symbol.ruby #00f3ff —
inline-color-decoration rgb-value #ffffff —
support.type.primitive.ts,support.type.builtin.ts,support.type.primitive.tsx,support.type.builtin.tsx #5cff00 —
block.scope.end,block.scope.begin #ffffff —
entity.name.variable.local.cs #ff0014 —
token.error-token #f44747 —
token.debug-token #ff8300 —
punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded #ff8300 —
meta.template.expression #ffffff —
keyword.operator.module #ff8300 —
support.type.type.flowtype #f7ff00 —
support.type.primitive #5cff00 —
meta.property.object #ff0014 —
variable.parameter.function.js #ff0014 —
keyword.other.template.begin #9c4aff —
keyword.other.template.end #9c4aff —
keyword.other.substitution.begin #9c4aff —
keyword.other.substitution.end #9c4aff —
keyword.operator.assignment #00f3ff —
keyword.operator.assignment.go #5cff00 —
keyword.operator.arithmetic.go, keyword.operator.address.go #ff8300 —
entity.name.package.go #5cff00 —
support.type.prelude.elm #00f3ff —
support.constant.elm #ffffff —
punctuation.quasi.element #ff8300 —
constant.character.entity #ff0014 —
entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class #00f3ff —
entity.global.clojure #5cff00 —
meta.symbol.clojure #ff0014 —
constant.keyword.clojure #00f3ff —
meta.arguments.coffee, variable.parameter.function.coffee #ff0014 —
meta.scope.prerequisites.makefile #ff0014 —
storage.modifier.import.groovy #5cff00 —
meta.method.groovy #f7ff00 —
meta.definition.variable.name.groovy #ff0014 —
meta.definition.class.inherited.classes.groovy #9c4aff —
support.variable.semantic.hlsl #5cff00 —
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 #ff8300 —
text.variable, text.bracketed #ff0014 —
support.type.swift, support.type.vb.asp #5cff00 —
entity.name.function.xi #5cff00 —
entity.name.class.xi #00f3ff —
constant.character.character-class.regexp.xi #ff0014 —
constant.regexp.xi #ff8300 —
keyword.control.xi #00f3ff —
beginning.punctuation.definition.quote.markdown.xi #9c4aff —
beginning.punctuation.definition.list.markdown.xi #797979 —
constant.character.xi #f7ff00 —
constant.other.color.rgb-value.xi #ffffff —
punctuation.definition.tag.xi #797979 —
entity.name.label.cs, entity.name.scope-resolution.function.call, entity.name.scope-resolution.function.definition #5cff00 —
entity.name.label.cs, markup.heading.setext.1.markdown, markup.heading.setext.2.markdown #ff0014 —
meta.brace.square #ffffff —
comment, punctuation.definition.comment #797979 italic
markup.quote.markdown #797979 —
punctuation.definition.block.sequence.item.yaml #ffffff —
constant.language.symbol.elixir #00f3ff —
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 } !` ;
}
Neon-Black | Coding Theme