Skip to main content
none | Coding Theme
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 #080515 activityBar.background #080515 activityBar.foreground #ffffff activityBar.inactiveForeground #ffffff66 activityBarBadge.background #ced9d4 activityBarBadge.foreground #ffffff 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 #ff5e67 — variable.other.generic-type.haskell #da5dff — storage.type.haskell #ffa754 — support.variable.magic.python
Shiki preview TypeScript sample highlighted with this variant's colors and tokenColors.
badge.background #ffffff
badge.foreground #000000
breadcrumb.activeSelectionForeground #ffffff
breadcrumb.background #080515
breadcrumb.focusForeground #ffffff
breadcrumb.foreground #ffffffcc
button.background #0d091f
button.foreground #ffffff
button.hoverBackground #130d2e
button.secondaryBackground #0d091f
button.secondaryForeground #ffffff
button.secondaryHoverBackground #110b28
checkbox.background #080515
checkbox.border #ffffff
checkbox.foreground #ffffff
debugExceptionWidget.background #080515
debugExceptionWidget.border #191919
debugToolBar.background #080515
debugToolBar.border #191919
diffEditor.border #5c5c5c
diffEditor.insertedTextBackground #b59bfd33
diffEditor.insertedTextBorder #00000000
diffEditor.removedTextBackground #ff00001c
diffEditor.removedTextBorder #00000000
dropdown.background #080515
dropdown.border #ffffff
dropdown.foreground #ffffff
editor.background #080515
editor.findMatchBackground #2c2525
editor.findMatchBorder #3c4b5e00
editor.findMatchHighlightBackground #2c2c2c
editor.findMatchHighlightBorder #ad272700
editor.findRangeHighlightBackground #56565666
editor.findRangeHighlightBorder #ffffff00
editor.foldBackground #5e5e5e00
editor.foreground #ffffff
editor.hoverHighlightBackground #eff3f740
editor.inactiveSelectionBackground #0f0b24
editor.lineHighlightBackground #ffffff0A
editor.lineHighlightBorder #28282800
editor.rangeHighlightBackground #ffffff0b
editor.rangeHighlightBorder #ffffff00
editor.selectionBackground #0e0921
editor.selectionHighlightBackground #4d353542
editor.selectionHighlightBorder #313232
editor.wordHighlightBackground #212121
editor.wordHighlightBorder #ffffff00
editor.wordHighlightStrongBackground #3b3b3b
editor.wordHighlightStrongBorder #ffffff00
editorBracketMatch.background #4d4d4dfd
editorBracketMatch.border #88888800
editorCodeLens.foreground #999999
editorCursor.background #ffffff
editorCursor.foreground #9b9d99
editorError.background #fd858000
editorError.border #ffffff00
editorError.foreground #ee8570
editorGroup.border #444444
editorGroup.emptyBackground #080515
editorGroupHeader.border #080515
editorGroupHeader.tabsBackground #080515
editorGroupHeader.tabsBorder #de646400
editorGutter.addedBackground #05ad00d3
editorGutter.background #080515
editorGutter.commentRangeForeground #c5c5c5
editorGutter.deletedBackground #ff131eb7
editorGutter.foldingControlForeground #c5c5c5
editorGutter.modifiedBackground #0067849f
editorHoverWidget.background #080515
editorHoverWidget.border #30265a
editorHoverWidget.foreground #ffffff
editorIndentGuide.activeBackground #ffffff48
editorIndentGuide.background #ffffff48
editorInfo.background #4490BF00
editorInfo.border #4490BF00
editorInfo.foreground #57b0ff
editorLineNumber.activeForeground #68ffff
editorLineNumber.foreground #fdfdfd93
editorLink.activeForeground #00ff9f
editorMarkerNavigation.background #080515
editorMarkerNavigationError.background #686868
editorMarkerNavigationInfo.background #75beff
editorMarkerNavigationWarning.background #ebff00d5
editorOverviewRuler.background #db3d3d00
editorOverviewRuler.border #ffffff00
editorRuler.foreground #e4e4e428
editorSuggestWidget.background #080515
editorSuggestWidget.border #362c60
editorSuggestWidget.foreground #ffffff
editorSuggestWidget.highlightForeground #ffffff
editorSuggestWidget.selectedBackground #191432
editorWarning.background #ffffff00
editorWarning.border #ffffff00
editorWarning.foreground #ffd721
editorWhitespace.foreground #ffffff24
editorWidget.background #080515
editorWidget.foreground #ffffff
editorWidget.resizeBorder #ffffff
focusBorder #16161900
foreground #ffffff
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 #ffffff
input.background #080515
input.border #ffffff
input.foreground #ffffff
input.placeholderForeground #ffffff
inputOption.activeBackground #080515
inputOption.activeBorder #ffffff00
inputOption.activeForeground #ffffff
list.activeSelectionBackground #0c081f
list.activeSelectionForeground #ffffff
list.dropBackground #080515
list.focusBackground #080515
list.focusForeground #ffffff
list.highlightForeground #ffffff
list.hoverBackground #0c081f
list.hoverForeground #ffffff
list.inactiveSelectionBackground #080515
list.inactiveSelectionForeground #ffffff
listFilterWidget.background #231b45
listFilterWidget.noMatchesOutline #ffffff
listFilterWidget.outline #ffffff00
menu.background #080515
menu.border #ffffff85
menu.foreground #ffffff
menu.selectionBackground #110c28
menu.selectionBorder #ffffff00
menu.selectionForeground #ffffff
menu.separatorBackground #ffffff
menubar.selectionBackground #080515
menubar.selectionBorder #ffffff
menubar.selectionForeground #ffffff
merge.commonContentBackground #363636
merge.commonHeaderBackground #363636
merge.currentContentBackground #27403B
merge.currentHeaderBackground #367366
merge.incomingContentBackground #28384B
merge.incomingHeaderBackground #1e64bc
minimap.background #080515
minimap.errorHighlight #ee8570
minimap.findMatchHighlight #2c2525
minimap.selectionHighlight #0e0921
minimap.warningHighlight #ffd721
minimapGutter.addedBackground #05ad00d3
minimapGutter.deletedBackground #ff131eb7
minimapGutter.modifiedBackground #0067849f
notificationCenter.border #71373700
notificationCenterHeader.background #303031
notificationCenterHeader.foreground #ffffff
notifications.background #080515
notifications.border #ffffff00
notifications.foreground #ffffff
notificationsErrorIcon.foreground #f48771
notificationsInfoIcon.foreground #0082f7
notificationsWarningIcon.foreground #cca700
notificationToast.border #080515
panel.background #080515
panel.border #80808059
panelSection.border #5a5a5a99
panelTitle.activeBorder #ffffff
panelTitle.activeForeground #ffffff
panelTitle.inactiveForeground #ffffff99
peekView.border #231b47
peekViewEditor.background #080515
peekViewEditor.matchHighlightBackground #ff8f0030
peekViewEditor.matchHighlightBorder #ffa532b5
peekViewEditorGutter.background #080515
peekViewResult.background #080515
peekViewResult.fileForeground #ffffff91
peekViewResult.lineForeground #ffffff
peekViewResult.matchHighlightBackground #ffffff4d
peekViewResult.selectionBackground #a5a5a533
peekViewResult.selectionForeground #ffffff
peekViewTitle.background #11111111
peekViewTitleDescription.foreground #ffffffb3
peekViewTitleLabel.foreground #ffffff
pickerGroup.border #ffffff
pickerGroup.foreground #ffffff
progressBar.background #ffffff
scrollbar.shadow #b0404000
scrollbarSlider.activeBackground #0d0921
scrollbarSlider.background #7373730c
scrollbarSlider.hoverBackground #161030
selection.background #080515
settings.focusedRowBackground #ffffff07
settings.headerForeground #ffffff
sideBar.background #080515
sideBar.border #080515
sideBar.dropBackground #080515
sideBar.foreground #ffffff
sideBarSectionHeader.background #ffffff00
sideBarSectionHeader.border #080515
sideBarSectionHeader.foreground #ffffff
sideBarTitle.foreground #ffffff
statusBar.background #080515
statusBar.border #080515
statusBar.debuggingBackground #080515
statusBar.debuggingBorder #080515
statusBar.debuggingForeground #ffffff
statusBar.foreground #ffffff
statusBar.noFolderBackground #333333
statusBar.noFolderBorder #080515
statusBar.noFolderForeground #ffffff
statusBarItem.activeBackground #FFFFFF25
statusBarItem.hoverBackground #ffffff1f
statusBarItem.remoteBackground #080515
statusBarItem.remoteForeground #ffffff
tab.activeBackground #080515
tab.activeBorder #ffffff00
tab.activeBorderTop #00000000
tab.activeForeground #ffffff
tab.border #080515
tab.hoverBackground #0e0924
tab.hoverBorder #ffffff00
tab.hoverForeground #ffffff
tab.inactiveBackground #080515
tab.inactiveForeground #ffffff87
terminal.ansiBlack #000000
terminal.ansiBlue #2472c8
terminal.ansiBrightBlack #737373
terminal.ansiBrightBlue #3b8eea
terminal.ansiBrightCyan #29b8db
terminal.ansiBrightGreen #23d18b
terminal.ansiBrightMagenta #d670d6
terminal.ansiBrightRed #f14c4c
terminal.ansiBrightWhite #ffffff
terminal.ansiBrightYellow #f5f543
terminal.ansiCyan #11a8cd
terminal.ansiGreen #0dbc79
terminal.ansiMagenta #bc3fbc
terminal.ansiRed #cd3131
terminal.ansiWhite #d3d3d3
terminal.ansiYellow #e5e510
terminal.border #5a5a5a99
terminal.foreground #ffffff
terminal.selectionBackground #00000040
terminalCursor.background #ffffff
terminalCursor.foreground #000000
textLink.foreground #3bd1ff
titleBar.activeBackground #080515
titleBar.activeForeground #ffffff
titleBar.border #ffffff00
titleBar.inactiveBackground #080515
titleBar.inactiveForeground #ffffff
tree.indentGuidesStroke #080515
walkThrough.embeddedEditorBackground #00000050
widget.shadow #171132 #ff5e67
punctuation.separator.period.python,punctuation.separator.element.python,punctuation.parenthesis.begin.python,punctuation.parenthesis.end.python #ffffff —
variable.parameter.function.language.special.self.python #ffcb6a —
storage.modifier.lifetime.rust #ffffff —
support.function.std.rust #67baff —
entity.name.lifetime.rust #ffcb6a —
variable.language.rust #ff5e67 —
support.constant.edge #da5dff —
constant.other.character-class.regexp #ff5e67 —
keyword.operator.quantifier.regexp #ffa754 —
punctuation.definition.string.begin,punctuation.definition.string.end #a9ff6a —
variable.parameter.function #ffffff —
comment markup.link #a7abb4 —
markup.changed.diff #ffcb6a —
meta.diff.header.from-file,meta.diff.header.to-file,punctuation.definition.from-file.diff,punctuation.definition.to-file.diff #67baff —
markup.inserted.diff #a9ff6a —
markup.deleted.diff #ff5e67 —
meta.function.c,meta.function.cpp #ff5e67 —
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 #67baff —
support.constant.math #ffcb6a —
support.constant.property.math #ffa754 —
variable.other.constant #ffcb6a —
storage.type.annotation.java, storage.type.object.array.java #ffcb6a —
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 #ffcb6a —
keyword.operator.instanceof.java #da5dff —
meta.definition.variable.name.java #ff5e67 —
keyword.operator.logical #cffaff —
keyword.operator.bitwise #cffaff —
keyword.operator.channel #cffaff —
support.constant.property-value.scss,support.constant.property-value.css #ffa754 —
keyword.operator.css,keyword.operator.scss,keyword.operator.less #cffaff —
support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss #ffa754 —
punctuation.separator.list.comma.css #ffffff —
support.constant.color.w3c-standard-color-name.css #ffa754 —
support.type.vendored.property-name.css #cffaff —
support.module.node,support.type.object.module,support.module.node #ffcb6a —
entity.name.type.module #ffcb6a —
variable.other.readwrite,meta.object-literal.key,support.variable.property,support.variable.object.process,support.variable.object.node #ff5e67 —
support.constant.json #ffa754 —
keyword.operator.expression.instanceof, keyword.operator.new, keyword.operator.ternary, keyword.operator.optional, keyword.operator.expression.keyof #da5dff —
support.type.object.console #ff5e67 —
support.variable.property.process #ffa754 —
entity.name.function,support.function.console #67baff —
keyword.operator.misc.rust #ffffff —
keyword.operator.sigil.rust #da5dff —
keyword.operator.delete #da5dff —
support.type.object.dom #cffaff —
support.variable.dom,support.variable.property.dom #ff5e67 —
keyword.operator.arithmetic,keyword.operator.comparison,keyword.operator.decrement,keyword.operator.increment,keyword.operator.relational #cffaff —
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 #da5dff —
punctuation.separator.delimiter #ffffff —
punctuation.separator.c,punctuation.separator.cpp #da5dff —
support.type.posix-reserved.c,support.type.posix-reserved.cpp #cffaff —
keyword.operator.sizeof.c,keyword.operator.sizeof.cpp #da5dff —
variable.parameter.function.language.python #ffa754 —
support.type.python #cffaff —
keyword.operator.logical.python #da5dff —
variable.parameter.function.python #ffa754 —
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 #67baff —
constant.character.format.placeholder.other.python #ffa754 —
keyword.operator.assignment.compound #da5dff —
keyword.operator.assignment.compound.js,keyword.operator.assignment.compound.ts #cffaff —
entity.name.namespace #ffcb6a —
variable.language #ffcb6a —
token.variable.parameter.java #ffffff —
import.storage.java #ffcb6a —
token.package.keyword #da5dff —
entity.name.function, meta.require, support.function.any-method, variable.function #67baff —
entity.name.type.namespace #ffcb6a —
support.class, entity.name.type.class #ffcb6a —
entity.name.class.identifier.namespace.type #ffcb6a —
entity.name.class, variable.other.class.js, variable.other.class.ts #ffcb6a —
variable.other.class.php #ff5e67 —
control.elements, keyword.operator.less #ffa754 —
keyword.other.special-method #67baff —
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 #da5dff —
token.storage.type.java #ffcb6a —
support.type.property-name #ffffff —
support.constant.property-value #ffffff —
support.constant.font-name #ffa754 —
entity.other.inherited-class #ffcb6a —
constant.other.symbol #cffaff —
punctuation.definition.constant #ffa754 —
entity.other.attribute-name #ffa754 —
entity.other.attribute-name.id #67baff normal
entity.other.attribute-name.class.css #ffa754 normal
markup.heading punctuation.definition.heading, entity.name.section #67baff —
keyword.other.unit #ff5e67 —
markup.bold,todo.bold #ffa754 —
punctuation.definition.bold #ffcb6a —
markup.italic, punctuation.definition.italic,todo.emphasis #da5dff —
entity.name.section.markdown #ff5e67 —
punctuation.definition.heading.markdown #ff5e67 —
punctuation.definition.list.begin.markdown #ff5e67 —
markup.heading.setext #ffffff —
punctuation.definition.bold.markdown #ffa754 —
markup.inline.raw.markdown #a9ff6a —
markup.inline.raw.string.markdown #a9ff6a —
punctuation.definition.list.markdown #ff5e67 —
punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown #ff5e67 —
beginning.punctuation.definition.list.markdown #ff5e67 —
punctuation.definition.metadata.markdown #ff5e67 —
markup.underline.link.markdown,markup.underline.link.image.markdown #da5dff —
string.other.link.title.markdown,string.other.link.description.markdown #67baff —
constant.character.escape #cffaff —
punctuation.section.embedded, variable.interpolation #ff5e67 —
punctuation.section.embedded.begin,punctuation.section.embedded.end #da5dff —
invalid.illegal.bad-ampersand.html #ffffff —
invalid.deprecated #ffffff —
invalid.unimplemented #ffffff —
source.json meta.structure.dictionary.json > string.quoted.json #ff5e67 —
source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string #ff5e67 —
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 #a9ff6a —
source.json meta.structure.dictionary.json > constant.language.json,source.json meta.structure.array.json > constant.language.json #cffaff —
support.type.property-name.json #ff5e67 —
support.type.property-name.json punctuation #ff5e67 —
text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade #da5dff —
text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade #da5dff —
support.other.namespace.use.php,support.other.namespace.use-as.php,support.other.namespace.php,entity.other.alias.php,meta.interface.php #ffcb6a —
keyword.operator.error-control.php #da5dff —
keyword.operator.type.php #da5dff —
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 #ffcb6a —
meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php #67baff —
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 #ffa754 —
support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php #ffa754 —
entity.name.goto-label.php,support.other.php #67baff —
keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php #cffaff —
keyword.operator.regexp.php #da5dff —
keyword.operator.comparison.php #cffaff —
keyword.operator.heredoc.php,keyword.operator.nowdoc.php #da5dff —
meta.function.decorator.python #67baff —
support.token.decorator.python,meta.function.decorator.identifier.python #cffaff —
function.parameter #ffffff —
function.parameter.ruby, function.parameter.cs #ffffff —
constant.language.symbol.ruby #cffaff —
inline-color-decoration rgb-value #ffa754 —
support.type.primitive.ts,support.type.builtin.ts,support.type.primitive.tsx,support.type.builtin.tsx #ffcb6a —
block.scope.end,block.scope.begin #ffffff —
entity.name.variable.local.cs #ff5e67 —
token.error-token #f44747 —
token.debug-token #da5dff —
punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded #da5dff —
meta.template.expression #ffffff —
keyword.operator.module #da5dff —
support.type.type.flowtype #67baff —
support.type.primitive #ffcb6a —
meta.property.object #ff5e67 —
variable.parameter.function.js #ff5e67 —
keyword.other.template.begin #a9ff6a —
keyword.other.template.end #a9ff6a —
keyword.other.substitution.begin #a9ff6a —
keyword.other.substitution.end #a9ff6a —
keyword.operator.assignment #cffaff —
keyword.operator.assignment.go #ffcb6a —
keyword.operator.arithmetic.go, keyword.operator.address.go #da5dff —
entity.name.package.go #ffcb6a —
support.type.prelude.elm #cffaff —
support.constant.elm #ffa754 —
punctuation.quasi.element #da5dff —
constant.character.entity #ff5e67 —
entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class #cffaff —
entity.global.clojure #ffcb6a —
meta.symbol.clojure #ff5e67 —
constant.keyword.clojure #cffaff —
meta.arguments.coffee, variable.parameter.function.coffee #ff5e67 —
meta.scope.prerequisites.makefile #ff5e67 —
storage.modifier.import.groovy #ffcb6a —
meta.method.groovy #67baff —
meta.definition.variable.name.groovy #ff5e67 —
meta.definition.class.inherited.classes.groovy #a9ff6a —
support.variable.semantic.hlsl #ffcb6a —
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 #da5dff —
text.variable, text.bracketed #ff5e67 —
support.type.swift, support.type.vb.asp #ffcb6a —
entity.name.function.xi #ffcb6a —
entity.name.class.xi #cffaff —
constant.character.character-class.regexp.xi #ff5e67 —
constant.regexp.xi #da5dff —
keyword.control.xi #cffaff —
beginning.punctuation.definition.quote.markdown.xi #a9ff6a —
beginning.punctuation.definition.list.markdown.xi #a7abb4 —
constant.character.xi #67baff —
constant.other.color.rgb-value.xi #ffffff —
punctuation.definition.tag.xi #a7abb4 —
entity.name.label.cs, entity.name.scope-resolution.function.call, entity.name.scope-resolution.function.definition #ffcb6a —
entity.name.label.cs, markup.heading.setext.1.markdown, markup.heading.setext.2.markdown #ff5e67 —
meta.brace.square #ffffff —
comment, punctuation.definition.comment #a7abb4 italic
markup.quote.markdown #a7abb4 —
punctuation.definition.block.sequence.item.yaml #ffffff —
constant.language.symbol.elixir #cffaff —
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 } !` ;
}