Skip to main content
Home Theme VS Code The One Theme This is the very first version of a theme inspired by high fantasy works in literature, games and so on, enjoy!
The One Theme | 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 #f9dfb1 activityBar.background #faf5e5 activityBar.border #ffffff00 activityBar.foreground #8a5933 activityBar.inactiveForeground #8a593385 activityBarBadge.background #a4563c 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 #d73d3d — variable.other.generic-type.haskell #855eb0 — storage.type.haskell #d7bc3d — support.variable.magic.python
Shiki preview TypeScript sample highlighted with this variant's colors and tokenColors.
The One Theme — The One Theme Light
activityBarBadge.foreground #faf5e5
badge.background #a4563c
badge.foreground #faf5e5
breadcrumb.activeSelectionForeground #d77f3d
breadcrumb.background #faf5e5
breadcrumb.focusForeground #d77f3d
breadcrumb.foreground #8a5933
button.background #faf5e5
button.foreground #8a5933
button.hoverBackground #faf5e589
button.secondaryBackground #b68a6a
button.secondaryForeground #faf5e5
button.secondaryHoverBackground #4c5561
checkbox.background #faf5e5
checkbox.border #00000000
checkbox.foreground #8a5933
debugExceptionWidget.background #faf5e5
debugExceptionWidget.border #f6ca7d
debugToolBar.background #faf5e5
debugToolBar.border #f6ca7d
diffEditor.border #d7d7d7
diffEditor.insertedTextBackground #9bba5333
diffEditor.removedTextBackground #ff000033
dropdown.background #faf5e5
dropdown.border #00000000
dropdown.foreground #8a5933
editor.background #faf5e5
editor.findMatchBackground #f6ca7d
editor.findMatchBorder #ffffff
editor.findMatchHighlightBackground #f9dfb176
editor.findMatchHighlightBorder #ffffff00
editor.findRangeHighlightBackground #b4b4b44d
editor.findRangeHighlightBorder #ffffff00
editor.foldBackground #add6ff4d
editor.foreground #1f1000
editor.hoverHighlightBackground #add6ff26
editor.inactiveSelectionBackground #c2c2c276
editor.lineHighlightBackground #ffffff0A
editor.lineHighlightBorder #eeeeee
editor.rangeHighlightBackground #fdff0033
editor.rangeHighlightBorder #ffffff00
editor.selectionBackground #f9dfb176
editor.selectionHighlightBackground #1f1000
editor.selectionHighlightBorder #ffffff00
editor.wordHighlightBackground #57575740
editor.wordHighlightStrongBackground #0e639c40
editorBracketMatch.background #0064001a
editorBracketMatch.border #b9b9b9
editorCodeLens.foreground #8a5933
editorCursor.background #faf5e5
editorCursor.foreground #1f1000
editorError.background #B73A3400
editorError.border #ffffff00
editorError.foreground #e21e26
editorGroup.border #ffffff00
editorGroup.emptyBackground #faf5e5
editorGroupHeader.border #ffffff00
editorGroupHeader.tabsBackground #faf5e5
editorGroupHeader.tabsBorder #ffffff00
editorGutter.addedBackground #8fb244
editorGutter.background #faf5e5
editorGutter.commentRangeForeground #8a5933
editorGutter.deletedBackground #d73d3d
editorGutter.foldingControlForeground #8a5933
editorGutter.modifiedBackground #d7bc3d
editorHoverWidget.background #faf5e5
editorHoverWidget.border #f6ca7d
editorHoverWidget.foreground #8a5933
editorIndentGuide.activeBackground #939393
editorIndentGuide.background #d3d3d3
editorInfo.background #ffffff00
editorInfo.border #4490BF00
editorInfo.foreground #59cecf
editorLineNumber.activeForeground #e21e26
editorLineNumber.foreground #a4563c
editorLink.activeForeground #558ef7
editorMarkerNavigation.background #ffffff
editorMarkerNavigationError.background #e51400
editorMarkerNavigationInfo.background #75beff
editorMarkerNavigationWarning.background #e9a700
editorOverviewRuler.background #25252500
editorOverviewRuler.border #7f7f7f4d
editorRuler.foreground #d3d3d3
editorSuggestWidget.background #faf5e5
editorSuggestWidget.border #f6ca7d
editorSuggestWidget.foreground #8a593385
editorSuggestWidget.highlightForeground #8a5933
editorSuggestWidget.selectedBackground #f9dfb1
editorWarning.background #A9904000
editorWarning.border #ffffff00
editorWarning.foreground #d7bc3d
editorWhitespace.foreground #8a5933
editorWidget.background #faf5e5
editorWidget.foreground #8a5933
editorWidget.resizeBorder #8a5933
focusBorder #8a5933
foreground #8a5933
gitDecoration.addedResourceForeground #546827
gitDecoration.conflictingResourceForeground #855eb0
gitDecoration.deletedResourceForeground #a4563c
gitDecoration.ignoredResourceForeground #525254
gitDecoration.modifiedResourceForeground #d77f3d
gitDecoration.stageDeletedResourceForeground #d73d3d
gitDecoration.stageModifiedResourceForeground #fd7a17
gitDecoration.submoduleResourceForeground #558ef7
gitDecoration.untrackedResourceForeground #1f1000
icon.foreground #8a5933
input.background #faf5e5
input.border #00000000
input.foreground #8a5933
input.placeholderForeground #8a5933
inputOption.activeBackground #8a5933
inputOption.activeBorder #ffffff00
inputOption.activeForeground #faf5e5
list.activeSelectionBackground #8a5933
list.activeSelectionForeground #faf5e5
list.dropBackground #faf5e589
list.focusBackground #faf5e5
list.focusForeground #8a5933
list.highlightForeground #8a5933
list.hoverBackground #faf5e589
list.hoverForeground #8a5933
list.inactiveSelectionBackground #f6ca7d
list.inactiveSelectionForeground #4e3c27
listFilterWidget.background #faf5e5
listFilterWidget.noMatchesOutline #d73d3d
listFilterWidget.outline #00000000
menu.background #f9dfb1
menu.border #00000000
menu.foreground #8a5933
menu.selectionBackground #faf5e5
menu.selectionBorder #00000000
menu.selectionForeground #8a5933
menu.separatorBackground #8a5933
menubar.selectionBackground #f9dfb1
menubar.selectionBorder #ff000000
menubar.selectionForeground #8a5933
merge.commonContentBackground #E5E5E5
merge.commonHeaderBackground #BFBFBF
merge.currentContentBackground #DBF4EF
merge.currentHeaderBackground #A4E3D6
merge.incomingContentBackground #DBECFF
merge.incomingHeaderBackground #A6CFFF
minimap.background #faf5e5
minimap.errorHighlight #e21e26
minimap.findMatchHighlight #f6ca7d
minimap.selectionHighlight #f9dfb176
minimap.warningHighlight #d7bc3d
minimapGutter.addedBackground #8fb244
minimapGutter.deletedBackground #d73d3d
minimapGutter.modifiedBackground #d7bc3d
notificationCenter.border #f6ca7d
notificationCenterHeader.background #faf5e5
notificationCenterHeader.foreground #8a5933
notifications.background #faf5e5
notifications.border #f6ca7d
notifications.foreground #8a5933
notificationsErrorIcon.foreground #d73d3d
notificationsInfoIcon.foreground #558ef7
notificationsWarningIcon.foreground #d77f3d
notificationToast.border #f6ca7d
panel.background #faf5e5
panel.border #ffffff00
panelSection.border #8a5933
panelTitle.activeBorder #883838
panelTitle.activeForeground #8a5933
panelTitle.inactiveForeground #8a593385
peekView.border #007acc
peekViewEditor.background #f2f8fc
peekViewEditor.matchHighlightBackground #f5d802de
peekViewEditor.matchHighlightBorder #dbc417
peekViewEditorGutter.background #f2f8fc
peekViewResult.background #f3f3f3
peekViewResult.fileForeground #1e1e1e
peekViewResult.lineForeground #646465
peekViewResult.matchHighlightBackground #ea5c004d
peekViewResult.selectionBackground #3399ff33
peekViewResult.selectionForeground #6c6c6c
peekViewTitle.background #ffffff
peekViewTitleDescription.foreground #616161e6
peekViewTitleLabel.foreground #333333
pickerGroup.border #8a5933
pickerGroup.foreground #8a5933
progressBar.background #8a5933
scrollbar.shadow #ffffff00
scrollbarSlider.activeBackground #f6ca7d
scrollbarSlider.background #faf5e589
scrollbarSlider.hoverBackground #faf5e5
selection.background #f9dfb1
settings.focusedRowBackground #ffffff07
settings.headerForeground #8a5933
sideBar.background #f9dfb1
sideBar.border #ffffff00
sideBar.dropBackground #faf5e589
sideBar.foreground #8a5933
sideBarSectionHeader.background #faf5e5
sideBarSectionHeader.border #ffffff00
sideBarSectionHeader.foreground #8a5933
sideBarTitle.foreground #8a5933
statusBar.background #faf5e5
statusBar.border #b0434300
statusBar.debuggingBackground #d77f3d
statusBar.debuggingBorder #ff000000
statusBar.debuggingForeground #faf5e5
statusBar.foreground #8a5933
statusBar.noFolderBackground #855eb0
statusBar.noFolderBorder #ff000000
statusBar.noFolderForeground #faf5e5
statusBarItem.activeBackground #FFFFFF25
statusBarItem.hoverBackground #f9dfb176
statusBarItem.remoteBackground #8fb244
statusBarItem.remoteForeground #faf5e5
tab.activeBackground #faf5e5
tab.activeBorder #ffffff00
tab.activeBorderTop #f9dfb1
tab.activeForeground #8a5933
tab.border #f9dfb1
tab.hoverBackground #f9dfb176
tab.hoverBorder #ffffff00
tab.inactiveBackground #f9dfb1
tab.inactiveForeground #8a5933
terminal.ansiBlack #000000
terminal.ansiBlue #416ab6
terminal.ansiBrightBlack #666666
terminal.ansiBrightBlue #558ef7
terminal.ansiBrightCyan #59cecf
terminal.ansiBrightGreen #8fb244
terminal.ansiBrightMagenta #855eb0
terminal.ansiBrightRed #e21e26
terminal.ansiBrightWhite #cb834c
terminal.ansiBrightYellow #d7bc3d
terminal.ansiCyan #258080
terminal.ansiGreen #546827
terminal.ansiMagenta #808ec3
terminal.ansiRed #d73d3d
terminal.ansiWhite #8a5933
terminal.ansiYellow #99852b
terminal.border #8a5933
terminal.foreground #1f1000
terminal.selectionBackground #f9dfb176
terminalCursor.background #8a5933
terminalCursor.foreground #faf5e5
textLink.foreground #416ab6
titleBar.activeBackground #faf5e5
titleBar.activeForeground #8a5933
titleBar.border #00000000
titleBar.inactiveBackground #ddddddbf
titleBar.inactiveForeground #333333e1
tree.indentGuidesStroke #8a5933
walkThrough.embeddedEditorBackground #00000050
widget.shadow #00000029 #d73d3d
punctuation.separator.period.python,punctuation.separator.element.python,punctuation.parenthesis.begin.python,punctuation.parenthesis.end.python #1f1000 —
variable.parameter.function.language.special.self.python #8a5933 —
storage.modifier.lifetime.rust #1f1000 —
support.function.std.rust #558ef7 —
entity.name.lifetime.rust #8a5933 —
variable.language.rust #d73d3d —
support.constant.edge #855eb0 —
constant.other.character-class.regexp #d73d3d —
keyword.operator.quantifier.regexp #d7bc3d —
punctuation.definition.string.begin,punctuation.definition.string.end #557709 —
variable.parameter.function #1f1000 —
comment markup.link #b68a6a —
markup.changed.diff #8a5933 —
meta.diff.header.from-file,meta.diff.header.to-file,punctuation.definition.from-file.diff,punctuation.definition.to-file.diff #558ef7 —
markup.inserted.diff #557709 —
markup.deleted.diff #d73d3d —
meta.function.c,meta.function.cpp #d73d3d —
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 #1f1000 —
punctuation.separator.key-value #1f1000 —
keyword.operator.expression.import #558ef7 —
support.constant.math #8a5933 —
support.constant.property.math #d7bc3d —
variable.other.constant #8a5933 —
storage.type.annotation.java, storage.type.object.array.java #8a5933 —
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 #1f1000 —
storage.modifier.import.java,storage.type.java,storage.type.generic.java #8a5933 —
keyword.operator.instanceof.java #855eb0 —
meta.definition.variable.name.java #d73d3d —
keyword.operator.logical #49abab —
keyword.operator.bitwise #49abab —
keyword.operator.channel #49abab —
support.constant.property-value.scss,support.constant.property-value.css #d7bc3d —
keyword.operator.css,keyword.operator.scss,keyword.operator.less #49abab —
support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss #d7bc3d —
punctuation.separator.list.comma.css #1f1000 —
support.constant.color.w3c-standard-color-name.css #d7bc3d —
support.type.vendored.property-name.css #49abab —
support.module.node,support.type.object.module,support.module.node #8a5933 —
entity.name.type.module #8a5933 —
variable.other.readwrite,meta.object-literal.key,support.variable.property,support.variable.object.process,support.variable.object.node #d73d3d —
support.constant.json #d7bc3d —
keyword.operator.expression.instanceof, keyword.operator.new, keyword.operator.ternary, keyword.operator.optional, keyword.operator.expression.keyof #855eb0 —
support.type.object.console #d73d3d —
support.variable.property.process #d7bc3d —
entity.name.function,support.function.console #558ef7 —
keyword.operator.misc.rust #1f1000 —
keyword.operator.sigil.rust #855eb0 —
keyword.operator.delete #855eb0 —
support.type.object.dom #49abab —
support.variable.dom,support.variable.property.dom #d73d3d —
keyword.operator.arithmetic,keyword.operator.comparison,keyword.operator.decrement,keyword.operator.increment,keyword.operator.relational #49abab —
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 #855eb0 —
punctuation.separator.delimiter #1f1000 —
punctuation.separator.c,punctuation.separator.cpp #855eb0 —
support.type.posix-reserved.c,support.type.posix-reserved.cpp #49abab —
keyword.operator.sizeof.c,keyword.operator.sizeof.cpp #855eb0 —
variable.parameter.function.language.python #d7bc3d —
support.type.python #49abab —
keyword.operator.logical.python #855eb0 —
variable.parameter.function.python #d7bc3d —
punctuation.definition.arguments.begin.python,punctuation.definition.arguments.end.python,punctuation.separator.arguments.python,punctuation.definition.list.begin.python,punctuation.definition.list.end.python #1f1000 —
meta.function-call.generic.python #558ef7 —
constant.character.format.placeholder.other.python #d7bc3d —
keyword.operator.assignment.compound #855eb0 —
keyword.operator.assignment.compound.js,keyword.operator.assignment.compound.ts #49abab —
entity.name.namespace #8a5933 —
variable.language #8a5933 —
token.variable.parameter.java #1f1000 —
import.storage.java #8a5933 —
token.package.keyword #855eb0 —
entity.name.function, meta.require, support.function.any-method, variable.function #558ef7 —
entity.name.type.namespace #8a5933 —
support.class, entity.name.type.class #8a5933 —
entity.name.class.identifier.namespace.type #8a5933 —
entity.name.class, variable.other.class.js, variable.other.class.ts #8a5933 —
variable.other.class.php #d73d3d —
control.elements, keyword.operator.less #d7bc3d —
keyword.other.special-method #558ef7 —
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 #855eb0 —
token.storage.type.java #8a5933 —
support.type.property-name #1f1000 —
support.constant.property-value #1f1000 —
support.constant.font-name #d7bc3d —
entity.other.inherited-class #8a5933 —
constant.other.symbol #49abab —
punctuation.definition.constant #d7bc3d —
entity.other.attribute-name #d7bc3d —
entity.other.attribute-name.id #558ef7 normal
entity.other.attribute-name.class.css #d7bc3d normal
markup.heading punctuation.definition.heading, entity.name.section #558ef7 —
keyword.other.unit #d73d3d —
markup.bold,todo.bold #d7bc3d —
punctuation.definition.bold #8a5933 —
markup.italic, punctuation.definition.italic,todo.emphasis #855eb0 —
entity.name.section.markdown #d73d3d —
punctuation.definition.heading.markdown #d73d3d —
punctuation.definition.list.begin.markdown #d73d3d —
markup.heading.setext #1f1000 —
punctuation.definition.bold.markdown #d7bc3d —
markup.inline.raw.markdown #557709 —
markup.inline.raw.string.markdown #557709 —
punctuation.definition.list.markdown #d73d3d —
punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown #d73d3d —
beginning.punctuation.definition.list.markdown #d73d3d —
punctuation.definition.metadata.markdown #d73d3d —
markup.underline.link.markdown,markup.underline.link.image.markdown #855eb0 —
string.other.link.title.markdown,string.other.link.description.markdown #558ef7 —
constant.character.escape #49abab —
punctuation.section.embedded, variable.interpolation #d73d3d —
punctuation.section.embedded.begin,punctuation.section.embedded.end #855eb0 —
invalid.illegal.bad-ampersand.html #1f1000 —
invalid.deprecated #ffffff —
invalid.unimplemented #ffffff —
source.json meta.structure.dictionary.json > string.quoted.json #d73d3d —
source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string #d73d3d —
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 #557709 —
source.json meta.structure.dictionary.json > constant.language.json,source.json meta.structure.array.json > constant.language.json #49abab —
support.type.property-name.json #d73d3d —
support.type.property-name.json punctuation #d73d3d —
text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade #855eb0 —
text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade #855eb0 —
support.other.namespace.use.php,support.other.namespace.use-as.php,support.other.namespace.php,entity.other.alias.php,meta.interface.php #8a5933 —
keyword.operator.error-control.php #855eb0 —
keyword.operator.type.php #855eb0 —
punctuation.section.array.begin.php #1f1000 —
punctuation.section.array.end.php #1f1000 —
invalid.illegal.non-null-typehinted.php #f44747 —
storage.type.php,meta.other.type.phpdoc.php,keyword.other.type.php,keyword.other.array.phpdoc.php #8a5933 —
meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php #558ef7 —
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 #1f1000 —
support.constant.core.rust #d7bc3d —
support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php #d7bc3d —
entity.name.goto-label.php,support.other.php #558ef7 —
keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php #49abab —
keyword.operator.regexp.php #855eb0 —
keyword.operator.comparison.php #49abab —
keyword.operator.heredoc.php,keyword.operator.nowdoc.php #855eb0 —
meta.function.decorator.python #558ef7 —
support.token.decorator.python,meta.function.decorator.identifier.python #49abab —
function.parameter #1f1000 —
function.parameter.ruby, function.parameter.cs #1f1000 —
constant.language.symbol.ruby #49abab —
inline-color-decoration rgb-value #d7bc3d —
support.type.primitive.ts,support.type.builtin.ts,support.type.primitive.tsx,support.type.builtin.tsx #8a5933 —
block.scope.end,block.scope.begin #1f1000 —
entity.name.variable.local.cs #d73d3d —
token.error-token #f44747 —
token.debug-token #855eb0 —
punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded #855eb0 —
meta.template.expression #1f1000 —
keyword.operator.module #855eb0 —
support.type.type.flowtype #558ef7 —
support.type.primitive #8a5933 —
meta.property.object #d73d3d —
variable.parameter.function.js #d73d3d —
keyword.other.template.begin #557709 —
keyword.other.template.end #557709 —
keyword.other.substitution.begin #557709 —
keyword.other.substitution.end #557709 —
keyword.operator.assignment #49abab —
keyword.operator.assignment.go #8a5933 —
keyword.operator.arithmetic.go, keyword.operator.address.go #855eb0 —
entity.name.package.go #8a5933 —
support.type.prelude.elm #49abab —
support.constant.elm #d7bc3d —
punctuation.quasi.element #855eb0 —
constant.character.entity #d73d3d —
entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class #49abab —
entity.global.clojure #8a5933 —
meta.symbol.clojure #d73d3d —
constant.keyword.clojure #49abab —
meta.arguments.coffee, variable.parameter.function.coffee #d73d3d —
meta.scope.prerequisites.makefile #d73d3d —
storage.modifier.import.groovy #8a5933 —
meta.method.groovy #558ef7 —
meta.definition.variable.name.groovy #d73d3d —
meta.definition.class.inherited.classes.groovy #557709 —
support.variable.semantic.hlsl #8a5933 —
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 #855eb0 —
text.variable, text.bracketed #d73d3d —
support.type.swift, support.type.vb.asp #8a5933 —
entity.name.function.xi #8a5933 —
entity.name.class.xi #49abab —
constant.character.character-class.regexp.xi #d73d3d —
constant.regexp.xi #855eb0 —
keyword.control.xi #49abab —
beginning.punctuation.definition.quote.markdown.xi #557709 —
beginning.punctuation.definition.list.markdown.xi #b68a6a —
constant.character.xi #558ef7 —
constant.other.color.rgb-value.xi #ffffff —
punctuation.definition.tag.xi #b68a6a —
entity.name.label.cs, entity.name.scope-resolution.function.call, entity.name.scope-resolution.function.definition #8a5933 —
entity.name.label.cs, markup.heading.setext.1.markdown, markup.heading.setext.2.markdown #d73d3d —
meta.brace.square #1f1000 —
comment, punctuation.definition.comment #b68a6a italic
markup.quote.markdown #b68a6a —
punctuation.definition.block.sequence.item.yaml #1f1000 —
constant.language.symbol.elixir #49abab —
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
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
fetchUser
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 } !` ;
}