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 #333333 activityBar.foreground #ffffff activityBar.inactiveForeground #ffffff66 activityBarBadge.background #2a9d8f activityBarBadge.foreground #ffffff badge.background #4d4d4d 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 #2fcbee — variable.other.generic-type.haskell #ffffff — storage.type.haskell #adcbbd — support.variable.magic.python
Shiki preview TypeScript sample highlighted with this variant's colors and tokenColors.
lupus — Lupus Color Theme
badge.foreground
#ffffff
breadcrumb.activeSelectionForeground #e0e0e0
breadcrumb.background #3d3d3d
breadcrumb.focusForeground #e0e0e0
breadcrumb.foreground #cccccccc
button.background #2a9d8f
button.foreground #ffffff
button.hoverBackground #3cd7c4
button.secondaryBackground #3a3d41
button.secondaryForeground #ffffff
button.secondaryHoverBackground #45494e
checkbox.background #3c3c3c
checkbox.border #00000000
checkbox.foreground #cccccc
debugExceptionWidget.background #333333
debugExceptionWidget.border #474747
debugToolBar.background #333333
debugToolBar.border #474747
diffEditor.border #444444
diffEditor.insertedTextBackground #9bb95533
diffEditor.removedTextBackground #ff000033
dropdown.background #3c3c3c
dropdown.border #00000000
dropdown.foreground #cccccc
editor.background #4b4a4a
editor.findMatchBackground #264653
editor.findMatchBorder #264653
editor.findMatchHighlightBackground #f4a26152
editor.findMatchHighlightBorder #ffffff00
editor.findRangeHighlightBackground #3a3d4166
editor.findRangeHighlightBorder #ffffff00
editor.foldBackground #26465385
editor.foreground #dedede
editor.hoverHighlightBackground #26465372
editor.inactiveSelectionBackground #3a3d41
editor.lineHighlightBackground #2a9d8f1a
editor.lineHighlightBorder #2828281a
editor.rangeHighlightBackground #ffffff0b
editor.rangeHighlightBorder #ffffff00
editor.selectionBackground #f4a26166
editor.selectionHighlightBackground #add6ff26
editor.selectionHighlightBorder #264653
editor.wordHighlightBackground #575757b8
editor.wordHighlightStrongBackground #264653bd
editorBracketMatch.background #0064001a
editorBracketMatch.border #888888
editorCodeLens.foreground #999999
editorCursor.background #0f0f0f
editorCursor.foreground #aeafad
editorError.background #B73A3400
editorError.border #ffffff00
editorError.foreground #e76f51
editorGroup.border #444444
editorGroup.emptyBackground #4b4a4a
editorGroupHeader.tabsBackground #373738
editorGutter.addedBackground #587c0c
editorGutter.background #454545
editorGutter.commentRangeForeground #c5c5c5
editorGutter.deletedBackground #94151b
editorGutter.foldingControlForeground #c5c5c5
editorGutter.modifiedBackground #0c7d9d
editorHoverWidget.background #252526
editorHoverWidget.border #454545
editorHoverWidget.foreground #cccccc
editorIndentGuide.activeBackground #707070
editorIndentGuide.background #404040
editorInfo.background #4490BF00
editorInfo.border #4490BF00
editorInfo.foreground #75beff
editorLineNumber.activeForeground #c6c6c6
editorLineNumber.foreground #858585
editorLink.activeForeground #2a9d8f
editorMarkerNavigation.background #2d2d30
editorMarkerNavigationError.background #f48771
editorMarkerNavigationInfo.background #528421
editorMarkerNavigationWarning.background #f9ff4a
editorOverviewRuler.background #25252500
editorOverviewRuler.border #7f7f7f4d
editorRuler.foreground #5a5a5a
editorSuggestWidget.background #252526
editorSuggestWidget.border #454545
editorSuggestWidget.foreground #d4d4d4
editorSuggestWidget.highlightForeground #528421
editorSuggestWidget.selectedBackground #52842170
editorWarning.background #a9904000
editorWarning.border #ffffff00
editorWarning.foreground #f9ff4ae7
editorWhitespace.foreground #e3e4e229
editorWidget.background #252526
editorWidget.foreground #cccccc
editorWidget.resizeBorder #5F5F5F
focusBorder #2a9d8f
foreground #cccccc
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 #cccccc
input.background #3c3c3c
input.border #00000000
input.foreground #cccccc
input.placeholderForeground #a6a6a6
inputOption.activeBackground #2a9d8fbb
inputOption.activeBorder #007acc00
inputOption.activeForeground #ffffff
list.activeSelectionBackground #264653
list.activeSelectionForeground #ffffff
list.dropBackground #383b3d
list.focusBackground #264653
list.focusForeground #cccccc
list.highlightForeground #2a9d8f
list.hoverBackground #2a2d2e
list.hoverForeground #cccccc
list.inactiveSelectionBackground #37373d
list.inactiveSelectionForeground #cccccc
listFilterWidget.background #653723
listFilterWidget.noMatchesOutline #e76f51
listFilterWidget.outline #00000000
menu.background #252526
menu.border #00000085
menu.foreground #cccccc
menu.selectionBackground #264653
menu.selectionBorder #00000000
menu.selectionForeground #ffffff
menu.separatorBackground #bbbbbb
menubar.selectionBackground #ffffff1a
menubar.selectionForeground #cccccc
merge.commonContentBackground #282828
merge.commonHeaderBackground #383838
merge.currentContentBackground #27403B
merge.currentHeaderBackground #367366
merge.incomingContentBackground #28384B
merge.incomingHeaderBackground #395F8F
minimap.background #4b4a4a
minimap.errorHighlight #e76f51
minimap.findMatchHighlight #264653
minimap.selectionHighlight #f4a26166
minimap.warningHighlight #f9ff4ae7
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 #e76f51
notificationsInfoIcon.foreground #75beff
notificationsWarningIcon.foreground #f4a261
notificationToast.border #474747
panel.background #3f3f3f
panel.border #80808059
panelSection.border #80808059
panelTitle.activeBorder #e7e7e7
panelTitle.activeForeground #e7e7e7
panelTitle.inactiveForeground #e7e7e799
peekView.border #528421
peekViewEditor.background #2a2a2a
peekViewEditor.matchHighlightBackground #fdad4699
peekViewEditor.matchHighlightBorder #00000000
peekViewEditorGutter.background #303030
peekViewResult.background #252526
peekViewResult.fileForeground #ffffff
peekViewResult.lineForeground #bbbbbb
peekViewResult.matchHighlightBackground #ea5c004d
peekViewResult.selectionBackground #52842140
peekViewResult.selectionForeground #ffffff
peekViewTitle.background #1e1e1e
peekViewTitleDescription.foreground #ccccccb3
peekViewTitleLabel.foreground #ffffff
pickerGroup.border #3f3f46
pickerGroup.foreground #2a9d8f
progressBar.background #2a9d8f
scrollbar.shadow #000000
scrollbarSlider.activeBackground #bfbfbf66
scrollbarSlider.background #79797966
scrollbarSlider.hoverBackground #646464b3
selection.background #264653
settings.focusedRowBackground #ffffff07
settings.headerForeground #cccccc
sideBar.background #4d4d4f
sideBar.dropBackground #383b3d
sideBar.foreground #cccccc
sideBarSectionHeader.background #00000000
sideBarSectionHeader.border #cccccc33
sideBarSectionHeader.foreground #cccccc
sideBarTitle.foreground #bbbbbb
statusBar.background #626262
statusBar.debuggingBackground #e76f51
statusBar.debuggingForeground #ffffff
statusBar.foreground #ffffff
statusBar.noFolderBackground #68217a
statusBar.noFolderForeground #ffffff
statusBarItem.activeBackground #FFFFFF25
statusBarItem.hoverBackground #ffffff1f
statusBarItem.remoteBackground #2a9d8f
statusBarItem.remoteForeground #ffffff
tab.activeBackground #4f4d4d
tab.activeBorder #00000000
tab.activeBorderTop #00000000
tab.activeForeground #ffffff
tab.border #252526
tab.inactiveBackground #323232
tab.inactiveForeground #ffffff80
terminal.ansiBlack #000000
terminal.ansiBlue #2472c8
terminal.ansiBrightBlack #666666
terminal.ansiBrightBlue #3b8eea
terminal.ansiBrightCyan #29b8db
terminal.ansiBrightGreen #23d18b
terminal.ansiBrightMagenta #d670d6
terminal.ansiBrightRed #f14c4c
terminal.ansiBrightWhite #e5e5e5
terminal.ansiBrightYellow #f5f543
terminal.ansiCyan #11a8cd
terminal.ansiGreen #0dbc79
terminal.ansiMagenta #bc3fbc
terminal.ansiRed #cd3131
terminal.ansiWhite #e5e5e5
terminal.ansiYellow #e5e510
terminal.border #80808059
terminal.foreground #cccccc
terminal.selectionBackground #ffffff40
terminalCursor.background #2a9d8f
terminalCursor.foreground #ffffff
textLink.foreground #2a9d8f
titleBar.activeBackground #4b4a4a
titleBar.activeForeground #cccccc
titleBar.border #00000000
titleBar.inactiveBackground #3c3c3c99
titleBar.inactiveForeground #cccccc99
tree.indentGuidesStroke #585858
walkThrough.embeddedEditorBackground #00000050
widget.shadow #0000005c #2fcbee
punctuation.separator.period.python,punctuation.separator.element.python,punctuation.parenthesis.begin.python,punctuation.parenthesis.end.python #dedede —
variable.parameter.function.language.special.self.python #2ed194 —
storage.modifier.lifetime.rust #dedede —
support.function.std.rust #2fcbee —
entity.name.lifetime.rust #2ed194 —
variable.language.rust #2fcbee —
support.constant.edge #ffffff —
constant.other.character-class.regexp #2fcbee —
keyword.operator.quantifier.regexp #adcbbd —
punctuation.definition.string.begin,punctuation.definition.string.end #e0b391 —
variable.parameter.function #dedede —
comment markup.link #888888 —
markup.changed.diff #2ed194 —
meta.diff.header.from-file,meta.diff.header.to-file,punctuation.definition.from-file.diff,punctuation.definition.to-file.diff #2fcbee —
markup.inserted.diff #e0b391 —
markup.deleted.diff #2fcbee —
meta.function.c,meta.function.cpp #2fcbee —
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 #dedede —
punctuation.separator.key-value #dedede —
keyword.operator.expression.import #2fcbee —
support.constant.math #2ed194 —
support.constant.property.math #adcbbd —
variable.other.constant #2ed194 —
storage.type.annotation.java, storage.type.object.array.java #2ed194 —
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 #dedede —
storage.modifier.import.java,storage.type.java,storage.type.generic.java #2ed194 —
keyword.operator.instanceof.java #ffffff —
meta.definition.variable.name.java #2fcbee —
keyword.operator.logical #f9ff4a —
keyword.operator.bitwise #f9ff4a —
keyword.operator.channel #f9ff4a —
support.constant.property-value.scss,support.constant.property-value.css #adcbbd —
keyword.operator.css,keyword.operator.scss,keyword.operator.less #f9ff4a —
support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss #adcbbd —
punctuation.separator.list.comma.css #dedede —
support.constant.color.w3c-standard-color-name.css #adcbbd —
support.type.vendored.property-name.css #f9ff4a —
support.module.node,support.type.object.module,support.module.node #2ed194 —
entity.name.type.module #2ed194 —
variable.other.readwrite,meta.object-literal.key,support.variable.property,support.variable.object.process,support.variable.object.node #2fcbee —
support.constant.json #adcbbd —
keyword.operator.expression.instanceof, keyword.operator.new, keyword.operator.ternary, keyword.operator.optional, keyword.operator.expression.keyof #ffffff —
support.type.object.console #2fcbee —
support.variable.property.process #adcbbd —
entity.name.function,support.function.console #2fcbee —
keyword.operator.misc.rust #dedede —
keyword.operator.sigil.rust #ffffff —
keyword.operator.delete #ffffff —
support.type.object.dom #f9ff4a —
support.variable.dom,support.variable.property.dom #2fcbee —
keyword.operator.arithmetic,keyword.operator.comparison,keyword.operator.decrement,keyword.operator.increment,keyword.operator.relational #f9ff4a —
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 #ffffff —
punctuation.separator.delimiter #dedede —
punctuation.separator.c,punctuation.separator.cpp #ffffff —
support.type.posix-reserved.c,support.type.posix-reserved.cpp #f9ff4a —
keyword.operator.sizeof.c,keyword.operator.sizeof.cpp #ffffff —
variable.parameter.function.language.python #adcbbd —
support.type.python #f9ff4a —
keyword.operator.logical.python #ffffff —
variable.parameter.function.python #adcbbd —
punctuation.definition.arguments.begin.python,punctuation.definition.arguments.end.python,punctuation.separator.arguments.python,punctuation.definition.list.begin.python,punctuation.definition.list.end.python #dedede —
meta.function-call.generic.python #2fcbee —
constant.character.format.placeholder.other.python #adcbbd —
keyword.operator.assignment.compound #ffffff —
keyword.operator.assignment.compound.js,keyword.operator.assignment.compound.ts #f9ff4a —
entity.name.namespace #2ed194 —
variable.language #2ed194 —
token.variable.parameter.java #dedede —
import.storage.java #2ed194 —
token.package.keyword #ffffff —
entity.name.function, meta.require, support.function.any-method, variable.function #2fcbee —
entity.name.type.namespace #2ed194 —
support.class, entity.name.type.class #2ed194 —
entity.name.class.identifier.namespace.type #2ed194 —
entity.name.class, variable.other.class.js, variable.other.class.ts #2ed194 —
variable.other.class.php #2fcbee —
control.elements, keyword.operator.less #adcbbd —
keyword.other.special-method #2fcbee —
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 #ffffff —
token.storage.type.java #2ed194 —
support.type.property-name #dedede —
support.constant.property-value #dedede —
support.constant.font-name #adcbbd —
entity.other.inherited-class #2ed194 —
constant.other.symbol #f9ff4a —
punctuation.definition.constant #adcbbd —
entity.other.attribute-name #adcbbd —
entity.other.attribute-name.id #2fcbee normal
entity.other.attribute-name.class.css #adcbbd normal
markup.heading punctuation.definition.heading, entity.name.section #2fcbee —
keyword.other.unit #2fcbee —
markup.bold,todo.bold #adcbbd —
punctuation.definition.bold #2ed194 —
markup.italic, punctuation.definition.italic,todo.emphasis #ffffff —
entity.name.section.markdown #2fcbee —
punctuation.definition.heading.markdown #2fcbee —
punctuation.definition.list.begin.markdown #2fcbee —
markup.heading.setext #dedede —
punctuation.definition.bold.markdown #adcbbd —
markup.inline.raw.markdown #e0b391 —
markup.inline.raw.string.markdown #e0b391 —
punctuation.definition.list.markdown #2fcbee —
punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown #2fcbee —
beginning.punctuation.definition.list.markdown #2fcbee —
punctuation.definition.metadata.markdown #2fcbee —
markup.underline.link.markdown,markup.underline.link.image.markdown #ffffff —
string.other.link.title.markdown,string.other.link.description.markdown #2fcbee —
constant.character.escape #f9ff4a —
punctuation.section.embedded, variable.interpolation #2fcbee —
punctuation.section.embedded.begin,punctuation.section.embedded.end #ffffff —
invalid.illegal.bad-ampersand.html #dedede —
invalid.deprecated #ffffff —
invalid.unimplemented #ffffff —
source.json meta.structure.dictionary.json > string.quoted.json #2fcbee —
source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string #2fcbee —
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 #e0b391 —
source.json meta.structure.dictionary.json > constant.language.json,source.json meta.structure.array.json > constant.language.json #f9ff4a —
support.type.property-name.json #2fcbee —
support.type.property-name.json punctuation #2fcbee —
text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade #ffffff —
text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade #ffffff —
support.other.namespace.use.php,support.other.namespace.use-as.php,support.other.namespace.php,entity.other.alias.php,meta.interface.php #2ed194 —
keyword.operator.error-control.php #ffffff —
keyword.operator.type.php #ffffff —
punctuation.section.array.begin.php #dedede —
punctuation.section.array.end.php #dedede —
invalid.illegal.non-null-typehinted.php #f44747 —
storage.type.php,meta.other.type.phpdoc.php,keyword.other.type.php,keyword.other.array.phpdoc.php #2ed194 —
meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php #2fcbee —
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 #dedede —
support.constant.core.rust #adcbbd —
support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php #adcbbd —
entity.name.goto-label.php,support.other.php #2fcbee —
keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php #f9ff4a —
keyword.operator.regexp.php #ffffff —
keyword.operator.comparison.php #f9ff4a —
keyword.operator.heredoc.php,keyword.operator.nowdoc.php #ffffff —
meta.function.decorator.python #2fcbee —
support.token.decorator.python,meta.function.decorator.identifier.python #f9ff4a —
function.parameter #dedede —
function.parameter.ruby, function.parameter.cs #dedede —
constant.language.symbol.ruby #f9ff4a —
inline-color-decoration rgb-value #adcbbd —
support.type.primitive.ts,support.type.builtin.ts,support.type.primitive.tsx,support.type.builtin.tsx #2ed194 —
block.scope.end,block.scope.begin #dedede —
entity.name.variable.local.cs #2fcbee —
token.error-token #f44747 —
token.debug-token #ffffff —
punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded #ffffff —
meta.template.expression #dedede —
keyword.operator.module #ffffff —
support.type.type.flowtype #2fcbee —
support.type.primitive #2ed194 —
meta.property.object #2fcbee —
variable.parameter.function.js #2fcbee —
keyword.other.template.begin #e0b391 —
keyword.other.template.end #e0b391 —
keyword.other.substitution.begin #e0b391 —
keyword.other.substitution.end #e0b391 —
keyword.operator.assignment #f9ff4a —
keyword.operator.assignment.go #2ed194 —
keyword.operator.arithmetic.go, keyword.operator.address.go #ffffff —
entity.name.package.go #2ed194 —
support.type.prelude.elm #f9ff4a —
support.constant.elm #adcbbd —
punctuation.quasi.element #ffffff —
constant.character.entity #2fcbee —
entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class #f9ff4a —
entity.global.clojure #2ed194 —
meta.symbol.clojure #2fcbee —
constant.keyword.clojure #f9ff4a —
meta.arguments.coffee, variable.parameter.function.coffee #2fcbee —
meta.scope.prerequisites.makefile #2fcbee —
storage.modifier.import.groovy #2ed194 —
meta.method.groovy #2fcbee —
meta.definition.variable.name.groovy #2fcbee —
meta.definition.class.inherited.classes.groovy #e0b391 —
support.variable.semantic.hlsl #2ed194 —
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 #ffffff —
text.variable, text.bracketed #2fcbee —
support.type.swift, support.type.vb.asp #2ed194 —
entity.name.function.xi #2ed194 —
entity.name.class.xi #f9ff4a —
constant.character.character-class.regexp.xi #2fcbee —
constant.regexp.xi #ffffff —
keyword.control.xi #f9ff4a —
beginning.punctuation.definition.quote.markdown.xi #e0b391 —
beginning.punctuation.definition.list.markdown.xi #888888 —
constant.character.xi #2fcbee —
constant.other.color.rgb-value.xi #ffffff —
punctuation.definition.tag.xi #888888 —
entity.name.label.cs, entity.name.scope-resolution.function.call, entity.name.scope-resolution.function.definition #2ed194 —
entity.name.label.cs, markup.heading.setext.1.markdown, markup.heading.setext.2.markdown #2fcbee —
meta.brace.square #dedede —
comment, punctuation.definition.comment #888888 italic
markup.quote.markdown #888888 —
punctuation.definition.block.sequence.item.yaml #dedede —
constant.language.symbol.elixir #f9ff4a —
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 } !` ;
}
lupus | Coding Theme