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 #00000000 activityBar.foreground #bbbbbb activityBar.inactiveForeground #555555 activityBarBadge.background #9d0f0f 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 #e64c70 — variable.other.generic-type.haskell #779fff — storage.type.haskell #54a761 — support.variable.magic.python
Shiki preview TypeScript sample highlighted with this variant's colors and tokenColors.
liuizn RED Theme — liuizn RED Theme
activityBarBadge.foreground
#ffffff
badge.background #8a1b1b
badge.foreground #ffffff
breadcrumb.activeSelectionForeground #3f2a2a
breadcrumb.background #000000
breadcrumb.focusForeground #3f2a2a
breadcrumb.foreground #ff0000
button.background #990b0b
button.foreground #e6e6e6
button.hoverBackground #c90404
button.secondaryBackground #322d2d
button.secondaryForeground #ffffff
button.secondaryHoverBackground #565151
checkbox.background #242121
checkbox.border #ff0000
checkbox.foreground #cccccc
debugExceptionWidget.background #1d1d1d
debugExceptionWidget.border #00000000
debugToolBar.background #1d1d1d
debugToolBar.border #00000000
diffEditor.border #00000000
diffEditor.insertedTextBackground #79943a33
diffEditor.insertedTextBorder #864c4c
diffEditor.removedTextBackground #ff4e4e33
diffEditor.removedTextBorder #8a41418b
dropdown.background #242121
dropdown.border #ff0000
dropdown.foreground #cccccc
editor.background #000000
editor.findMatchBackground #515c6a
editor.findMatchBorder #74879f00
editor.findMatchHighlightBackground #ea6e0055
editor.findMatchHighlightBorder #ffffff00
editor.findRangeHighlightBackground #66666630
editor.findRangeHighlightBorder #f2f2f200
editor.foldBackground #2831564d
editor.foreground #ffffff
editor.hoverHighlightBackground #a0cfff40
editor.inactiveSelectionBackground #3a3d41
editor.lineHighlightBackground #1110173c
editor.lineHighlightBorder #28282800
editor.rangeHighlightBackground #f96f6f0b
editor.rangeHighlightBorder #ffffff00
editor.selectionBackground #222222
editor.selectionHighlightBackground #ffadad26
editor.selectionHighlightBorder #00000000
editor.wordHighlightBackground #575757b8
editor.wordHighlightBorder #ff000000
editor.wordHighlightStrongBackground #9f0303b8
editor.wordHighlightStrongBorder #ff000000
editorBracketMatch.background #ff000022
editorBracketMatch.border #ff9077
editorCodeLens.foreground #9ea19c9b
editorCursor.background #111111
editorCursor.foreground #b3b4b2
editorError.background #7b444200
editorError.border #ffffff00
editorError.foreground #ff4620
editorGroup.border #00000070
editorGroup.emptyBackground #000000
editorGroupHeader.border #1d151500
editorGroupHeader.tabsBackground #0a0a0a
editorGroupHeader.tabsBorder #ff787800
editorGutter.addedBackground #4a792a
editorGutter.background #000000
editorGutter.commentRangeForeground #eeeeee
editorGutter.deletedBackground #c41f26
editorGutter.foldingControlForeground #eeeeee
editorGutter.modifiedBackground #26a8cd
editorHoverWidget.background #111111
editorHoverWidget.border #00000000
editorHoverWidget.foreground #cccccc
editorIndentGuide.activeBackground #222222
editorIndentGuide.background #111111
editorInfo.background #4490BF00
editorInfo.border #4490BF00
editorInfo.foreground #5186b6
editorLineNumber.activeForeground #ff0000
editorLineNumber.foreground #999999
editorLink.activeForeground #fd4242
editorMarkerNavigation.background #111111
editorMarkerNavigationError.background #ff5353
editorMarkerNavigationInfo.background #6dbaff
editorMarkerNavigationWarning.background #ffdb4d
editorOverviewRuler.background #5e5e5e00
editorOverviewRuler.border #c0afaf00
editorRuler.foreground #292c3e
editorSuggestWidget.background #1b1b1b
editorSuggestWidget.border #45454544
editorSuggestWidget.foreground #8e7575
editorSuggestWidget.highlightForeground #f51515
editorSuggestWidget.selectedBackground #341818
editorWarning.background #A9904000
editorWarning.border #ffffff00
editorWarning.foreground #ffe46c
editorWhitespace.foreground #222222
editorWidget.background #111111
editorWidget.foreground #888888
editorWidget.resizeBorder #28272700
focusBorder #00abff58
foreground #ff0000
gitDecoration.addedResourceForeground #a1ffb2
gitDecoration.conflictingResourceForeground #95a5ff
gitDecoration.deletedResourceForeground #ff6e6e
gitDecoration.ignoredResourceForeground #8c8c8c
gitDecoration.modifiedResourceForeground #ffeb9e
gitDecoration.stageDeletedResourceForeground #c74e39
gitDecoration.stageModifiedResourceForeground #e2c08d
gitDecoration.submoduleResourceForeground #8db9e2
gitDecoration.untrackedResourceForeground #73c991
icon.foreground #ff0000
input.background #242121
input.border #ff0000
input.foreground #cccccc
input.placeholderForeground #c9c5c5
inputOption.activeBackground #825252
inputOption.activeBorder #00000000
inputOption.activeForeground #ffffff
list.activeSelectionBackground #111111
list.activeSelectionForeground #ffffff
list.dropBackground #000000
list.focusBackground #5c4e4e
list.focusForeground #ffffff
list.highlightForeground #fe7777
list.hoverBackground #111111
list.hoverForeground #ffffff
list.inactiveSelectionBackground #1b1b1b
list.inactiveSelectionForeground #ffffff
listFilterWidget.background #000000
listFilterWidget.noMatchesOutline #00000000
listFilterWidget.outline #00000000
menu.background #1d1d1d
menu.border #8a7b7b00
menu.foreground #dddddd
menu.selectionBackground #111111
menu.selectionBorder #00000000
menu.selectionForeground #ffffff
menu.separatorBackground #4f677b54
menubar.selectionBackground #1d1d1d
menubar.selectionBorder #e60f0f00
menubar.selectionForeground #ffffff
merge.commonContentBackground #282828
merge.commonHeaderBackground #383838
merge.currentContentBackground #27403B
merge.currentHeaderBackground #367366
merge.incomingContentBackground #28384B
merge.incomingHeaderBackground #395F8F
minimap.background #000000
minimap.errorHighlight #ff4620
minimap.findMatchHighlight #515c6a
minimap.selectionHighlight #222222
minimap.warningHighlight #ffe46c
minimapGutter.addedBackground #4a792a
minimapGutter.deletedBackground #c41f26
minimapGutter.modifiedBackground #26a8cd
notificationCenter.border #00000000
notificationCenterHeader.background #111111
notificationCenterHeader.foreground #fbfbfb
notifications.background #111111
notifications.border #00000000
notifications.foreground #5e8094
notificationsErrorIcon.foreground #ff6e50
notificationsInfoIcon.foreground #6cbaff
notificationsWarningIcon.foreground #ffc047
notificationToast.border #47474700
panel.background #000000
panel.border #000000b5
panelSection.border #ff0000
panelTitle.activeBorder #ff0000
panelTitle.activeForeground #ffffff
panelTitle.inactiveForeground #a1a1a1
peekView.border #7bb4d900
peekViewEditor.background #222222
peekViewEditor.matchHighlightBackground #ffbf0056
peekViewEditor.matchHighlightBorder #00000000
peekViewEditorGutter.background #222222
peekViewResult.background #111111
peekViewResult.fileForeground #d76b6b
peekViewResult.lineForeground #bbbbbb
peekViewResult.matchHighlightBackground #ff3a254d
peekViewResult.selectionBackground #ff333333
peekViewResult.selectionForeground #ffffff
peekViewTitle.background #111111
peekViewTitleDescription.foreground #ccccccb3
peekViewTitleLabel.foreground #c75c5c
pickerGroup.border #00000000
pickerGroup.foreground #ff2f2f
progressBar.background #ff0000
scrollbar.shadow #000000
scrollbarSlider.activeBackground #ba1818d1
scrollbarSlider.background #ff000020
scrollbarSlider.hoverBackground #513333
selection.background #6b4949
settings.focusedRowBackground #ffffff07
settings.headerForeground #ff0000
sideBar.background #0a0a0a
sideBar.border #00000000
sideBar.dropBackground #000000
sideBar.foreground #909090
sideBarSectionHeader.background #00000000
sideBarSectionHeader.border #1d1d1d62
sideBarSectionHeader.foreground #ec2c2c
sideBarTitle.foreground #ffffff
statusBar.background #000000
statusBar.border #000000
statusBar.debuggingBackground #ba0505
statusBar.debuggingBorder #00000000
statusBar.debuggingForeground #ffffff
statusBar.foreground #ff0000
statusBar.noFolderBackground #4067db
statusBar.noFolderBorder #0a0a0a
statusBar.noFolderForeground #ffffff
statusBarItem.activeBackground #FFFFFF25
statusBarItem.hoverBackground #3d2525
statusBarItem.remoteBackground #0a0a0a
statusBarItem.remoteForeground #5c4b4b
tab.activeBackground #111010
tab.activeBorder #ff0000
tab.activeBorderTop #00000000
tab.activeForeground #ffffff
tab.border #00000000
tab.hoverBackground #151313
tab.hoverBorder #be1919
tab.hoverForeground #be1919
tab.inactiveBackground #0a0a0a
tab.inactiveForeground #a1a1a1
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 #ff0000
terminal.foreground #beb6b6
terminal.selectionBackground #776b6b40
terminalCursor.background #3f3e3e
terminalCursor.foreground #ffffff
textLink.foreground #ff0000
titleBar.activeBackground #000000
titleBar.activeForeground #cccccc
titleBar.border #00000000
titleBar.inactiveBackground #0a0a0a
titleBar.inactiveForeground #999999
tree.indentGuidesStroke #333333
walkThrough.embeddedEditorBackground #00000050
widget.shadow #00000054 #e64c70
punctuation.separator.period.python,punctuation.separator.element.python,punctuation.parenthesis.begin.python,punctuation.parenthesis.end.python #ffffff —
variable.parameter.function.language.special.self.python #e5c07b —
storage.modifier.lifetime.rust #ffffff —
support.function.std.rust #d90606 —
entity.name.lifetime.rust #e5c07b —
variable.language.rust #e64c70 —
support.constant.edge #779fff —
constant.other.character-class.regexp #e64c70 —
keyword.operator.quantifier.regexp #54a761 —
punctuation.definition.string.begin,punctuation.definition.string.end #ffb37b —
variable.parameter.function #ffffff —
comment markup.link #846e6e —
markup.changed.diff #e5c07b —
meta.diff.header.from-file,meta.diff.header.to-file,punctuation.definition.from-file.diff,punctuation.definition.to-file.diff #d90606 —
markup.inserted.diff #ffb37b —
markup.deleted.diff #e64c70 —
meta.function.c,meta.function.cpp #e64c70 —
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 #d90606 —
support.constant.math #e5c07b —
support.constant.property.math #54a761 —
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 #ffffff —
storage.modifier.import.java,storage.type.java,storage.type.generic.java #e5c07b —
keyword.operator.instanceof.java #779fff —
meta.definition.variable.name.java #e64c70 —
keyword.operator.logical #ffffff —
keyword.operator.bitwise #ffffff —
keyword.operator.channel #ffffff —
support.constant.property-value.scss,support.constant.property-value.css #54a761 —
keyword.operator.css,keyword.operator.scss,keyword.operator.less #ffffff —
support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss #54a761 —
punctuation.separator.list.comma.css #ffffff —
support.constant.color.w3c-standard-color-name.css #54a761 —
support.type.vendored.property-name.css #ffffff —
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 #e64c70 —
support.constant.json #54a761 —
keyword.operator.expression.instanceof, keyword.operator.new, keyword.operator.ternary, keyword.operator.optional, keyword.operator.expression.keyof #779fff —
support.type.object.console #e64c70 —
support.variable.property.process #54a761 —
entity.name.function,support.function.console #d90606 —
keyword.operator.misc.rust #ffffff —
keyword.operator.sigil.rust #779fff —
keyword.operator.delete #779fff —
support.type.object.dom #ffffff —
support.variable.dom,support.variable.property.dom #e64c70 —
keyword.operator.arithmetic,keyword.operator.comparison,keyword.operator.decrement,keyword.operator.increment,keyword.operator.relational #ffffff —
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 #779fff —
punctuation.separator.delimiter #ffffff —
punctuation.separator.c,punctuation.separator.cpp #779fff —
support.type.posix-reserved.c,support.type.posix-reserved.cpp #ffffff —
keyword.operator.sizeof.c,keyword.operator.sizeof.cpp #779fff —
variable.parameter.function.language.python #54a761 —
support.type.python #ffffff —
keyword.operator.logical.python #779fff —
variable.parameter.function.python #54a761 —
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 #d90606 —
constant.character.format.placeholder.other.python #54a761 —
keyword.operator.assignment.compound #779fff —
keyword.operator.assignment.compound.js,keyword.operator.assignment.compound.ts #ffffff —
entity.name.namespace #e5c07b —
variable.language #e5c07b —
token.variable.parameter.java #ffffff —
import.storage.java #e5c07b —
token.package.keyword #779fff —
entity.name.function, meta.require, support.function.any-method, variable.function #d90606 —
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 #e64c70 —
control.elements, keyword.operator.less #54a761 —
keyword.other.special-method #d90606 —
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 #779fff —
token.storage.type.java #e5c07b —
support.type.property-name #ffffff —
support.constant.property-value #ffffff —
support.constant.font-name #54a761 —
entity.other.inherited-class #e5c07b —
constant.other.symbol #ffffff —
punctuation.definition.constant #54a761 —
entity.other.attribute-name #54a761 —
entity.other.attribute-name.id #d90606 —
entity.other.attribute-name.class.css #54a761 —
markup.heading punctuation.definition.heading, entity.name.section #d90606 —
keyword.other.unit #e64c70 —
markup.bold,todo.bold #54a761 —
punctuation.definition.bold #e5c07b —
markup.italic, punctuation.definition.italic,todo.emphasis #779fff —
entity.name.section.markdown #e64c70 —
punctuation.definition.heading.markdown #e64c70 —
punctuation.definition.list.begin.markdown #e64c70 —
markup.heading.setext #ffffff —
punctuation.definition.bold.markdown #54a761 —
markup.inline.raw.markdown #ffb37b —
markup.inline.raw.string.markdown #ffb37b —
punctuation.definition.list.markdown #e64c70 —
punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown #e64c70 —
beginning.punctuation.definition.list.markdown #e64c70 —
punctuation.definition.metadata.markdown #e64c70 —
markup.underline.link.markdown,markup.underline.link.image.markdown #779fff —
string.other.link.title.markdown,string.other.link.description.markdown #d90606 —
constant.character.escape #ffffff —
punctuation.section.embedded, variable.interpolation #e64c70 —
punctuation.section.embedded.begin,punctuation.section.embedded.end #779fff —
invalid.illegal.bad-ampersand.html #ffffff —
invalid.deprecated #ffffff —
invalid.unimplemented #ffffff —
source.json meta.structure.dictionary.json > string.quoted.json #e64c70 —
source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string #e64c70 —
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 #ffb37b —
source.json meta.structure.dictionary.json > constant.language.json,source.json meta.structure.array.json > constant.language.json #ffffff —
support.type.property-name.json #e64c70 —
support.type.property-name.json punctuation #e64c70 —
text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade #779fff —
text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade #779fff —
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 #779fff —
keyword.operator.type.php #779fff —
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 #e5c07b —
meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php #d90606 —
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 #54a761 —
support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php #54a761 —
entity.name.goto-label.php,support.other.php #d90606 —
keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php #ffffff —
keyword.operator.regexp.php #779fff —
keyword.operator.comparison.php #ffffff —
keyword.operator.heredoc.php,keyword.operator.nowdoc.php #779fff —
meta.function.decorator.python #d90606 —
support.token.decorator.python,meta.function.decorator.identifier.python #ffffff —
function.parameter #ffffff —
function.parameter.ruby, function.parameter.cs #ffffff —
constant.language.symbol.ruby #ffffff —
inline-color-decoration rgb-value #54a761 —
support.type.primitive.ts,support.type.builtin.ts,support.type.primitive.tsx,support.type.builtin.tsx #e5c07b —
block.scope.end,block.scope.begin #ffffff —
entity.name.variable.local.cs #e64c70 —
token.error-token #f44747 —
token.debug-token #779fff —
punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded #779fff —
meta.template.expression #ffffff —
keyword.operator.module #779fff —
support.type.type.flowtype #d90606 —
support.type.primitive #e5c07b —
meta.property.object #e64c70 —
variable.parameter.function.js #e64c70 —
keyword.other.template.begin #ffb37b —
keyword.other.template.end #ffb37b —
keyword.other.substitution.begin #ffb37b —
keyword.other.substitution.end #ffb37b —
keyword.operator.assignment #ffffff —
keyword.operator.assignment.go #e5c07b —
keyword.operator.arithmetic.go, keyword.operator.address.go #779fff —
entity.name.package.go #e5c07b —
support.type.prelude.elm #ffffff —
support.constant.elm #54a761 —
punctuation.quasi.element #779fff —
constant.character.entity #e64c70 —
entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class #ffffff —
entity.global.clojure #e5c07b —
meta.symbol.clojure #e64c70 —
constant.keyword.clojure #ffffff —
meta.arguments.coffee, variable.parameter.function.coffee #e64c70 —
meta.scope.prerequisites.makefile #e64c70 —
storage.modifier.import.groovy #e5c07b —
meta.method.groovy #d90606 —
meta.definition.variable.name.groovy #e64c70 —
meta.definition.class.inherited.classes.groovy #ffb37b —
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 #779fff —
text.variable, text.bracketed #e64c70 —
support.type.swift, support.type.vb.asp #e5c07b —
entity.name.function.xi #e5c07b —
entity.name.class.xi #ffffff —
constant.character.character-class.regexp.xi #e64c70 —
constant.regexp.xi #779fff —
keyword.control.xi #ffffff —
beginning.punctuation.definition.quote.markdown.xi #ffb37b —
beginning.punctuation.definition.list.markdown.xi #846e6e —
constant.character.xi #d90606 —
constant.other.color.rgb-value.xi #ffffff —
punctuation.definition.tag.xi #846e6e —
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 #e64c70 —
meta.brace.square #ffffff —
comment, punctuation.definition.comment #846e6e italic
markup.quote.markdown #846e6e —
punctuation.definition.block.sequence.item.yaml #ffffff —
constant.language.symbol.elixir #ffffff —
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...
~/my-project
main*
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 } !` ;
}
liuizn RED Theme | Coding Theme