Skip to main content
Home Theme VS Code Naturally Green A deep green theme with healthy contrast for nature lovers
Naturally Green | 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 #006b39 activityBar.background #004330 activityBar.border #006b39 activityBar.foreground #86ffc6 activityBar.inactiveForeground #86ffc66a activityBarBadge.background #86ffc6 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 #c46b6b — variable.other.generic-type.haskell #bcbe71 — storage.type.haskell #64a162 — support.variable.magic.python
Shiki preview TypeScript sample highlighted with this variant's colors and tokenColors.
Naturally Green — Naturally Green
activityBarBadge.foreground
#004330
badge.background #006649
badge.foreground #ffffff
breadcrumb.activeSelectionForeground #e0e0e0
breadcrumb.background #001d15
breadcrumb.focusForeground #e0e0e0
breadcrumb.foreground #cccccccc
button.background #006b39
button.foreground #ffffff
button.hoverBackground #009f55
button.secondaryBackground #3a3d41
button.secondaryForeground #ffffff
button.secondaryHoverBackground #45494e
checkbox.background #001d15
checkbox.border #00000000
checkbox.foreground #cccccc
debugExceptionWidget.background #002a1e
debugExceptionWidget.border #004330
debugToolBar.background #002a1e
debugToolBar.border #004330
diffEditor.border #444444
diffEditor.insertedTextBackground #9bb95533
diffEditor.removedTextBackground #ff000033
dropdown.background #001d15
dropdown.border #00000000
dropdown.foreground #cccccc
editor.background #001f16
editor.findMatchBackground #006850
editor.findMatchBorder #00b256
editor.findMatchHighlightBackground #00ea7144
editor.findMatchHighlightBorder #ffffff00
editor.findRangeHighlightBackground #3a3d4166
editor.findRangeHighlightBorder #ffffff00
editor.foldBackground #264f784d
editor.foreground #d4d4d4
editor.hoverHighlightBackground #264f7840
editor.inactiveSelectionBackground #00341c2a
editor.lineHighlightBackground #ffffff0A
editor.lineHighlightBorder #282828
editor.rangeHighlightBackground #ffffff0b
editor.rangeHighlightBorder #ffffff00
editor.selectionBackground #006b39b1
editor.selectionHighlightBackground #005c3299
editor.selectionHighlightBorder #006b39
editor.wordHighlightBackground #575757b8
editor.wordHighlightStrongBackground #0e4100b8
editorBracketMatch.background #0064001a
editorBracketMatch.border #888888
editorCodeLens.foreground #999999
editorCursor.background #000000
editorCursor.foreground #86ffc6
editorError.background #B73A3400
editorError.border #ffffff00
editorError.foreground #f48771
editorGroup.border #444444
editorGroup.emptyBackground #001f16
editorGroupHeader.tabsBackground #001d15
editorGroupHeader.tabsBorder #16825d
editorGutter.addedBackground #587c0c
editorGutter.background #003627
editorGutter.commentRangeForeground #c5c5c5
editorGutter.deletedBackground #94151b
editorGutter.foldingControlForeground #c5c5c5
editorGutter.modifiedBackground #0c7d9d
editorHoverWidget.background #003022
editorHoverWidget.border #007956
editorHoverWidget.foreground #cccccc
editorIndentGuide.activeBackground1 #707070
editorIndentGuide.background1 #404040
editorInfo.background #4490BF00
editorInfo.border #4490BF00
editorInfo.foreground #75beff
editorLineNumber.activeForeground #86ffc6
editorLineNumber.foreground #006b39
editorLink.activeForeground #4e94ce
editorMarkerNavigation.background #115134
editorMarkerNavigationError.background #f48771
editorMarkerNavigationInfo.background #75beff
editorMarkerNavigationWarning.background #cca700
editorOverviewRuler.background #25252500
editorOverviewRuler.border #7f7f7f4d
editorRuler.foreground #5a5a5a
editorSuggestWidget.background #002e21
editorSuggestWidget.border #454545
editorSuggestWidget.foreground #d4d4d4
editorSuggestWidget.highlightForeground #06d97a
editorSuggestWidget.selectedBackground #1f6244
editorWarning.background #A9904000
editorWarning.border #ffffff00
editorWarning.foreground #cca700
editorWhitespace.foreground #ffffff2f
editorWidget.background #002a1e
editorWidget.foreground #cccccc
editorWidget.resizeBorder #004330
focusBorder #006b39
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 #001d15
input.border #00000000
input.foreground #cccccc
input.placeholderForeground #a6a6a6
inputOption.activeBackground #006649
inputOption.activeBorder #007acc00
inputOption.activeForeground #ffffff
list.activeSelectionBackground #006b39
list.activeSelectionForeground #ffffff
list.dropBackground #002118
list.focusBackground #006b39
list.focusForeground #ffffff
list.highlightForeground #86ffc6
list.hoverBackground #00433074
list.hoverForeground #cccccc
list.inactiveSelectionBackground #004330
list.inactiveSelectionForeground #cccccc
listFilterWidget.background #004330
listFilterWidget.noMatchesOutline #8a2e01
listFilterWidget.outline #00000000
menu.background #001d15
menu.border #00000000
menu.foreground #cccccc
menu.selectionBackground #006649
menu.selectionBorder #006b39
menu.selectionForeground #ffffff
menu.separatorBackground #86ffc65c
menubar.selectionBackground #006b39
menubar.selectionBorder #006b39
menubar.selectionForeground #cccccc
merge.commonContentBackground #2828289d
merge.commonHeaderBackground #3838389d
merge.currentContentBackground #27403B9d
merge.currentHeaderBackground #3673669d
merge.incomingContentBackground #28384B9d
merge.incomingHeaderBackground #395F8F9d
minimap.background #001f16
minimap.errorHighlight #f48771
minimap.findMatchHighlight #0068509d
minimap.selectionHighlight #006b39b1
minimap.warningHighlight #cca700
minimapGutter.addedBackground #587c0c
minimapGutter.deletedBackground #94151b
minimapGutter.modifiedBackground #0c7d9d
notificationCenter.border #00322400
notificationCenterHeader.background #001912
notificationCenterHeader.foreground #cccccc
notifications.background #002a1e
notifications.border #006448
notifications.foreground #cccccc
notificationsErrorIcon.foreground #f48771
notificationsInfoIcon.foreground #75beff
notificationsWarningIcon.foreground #cca700
notificationToast.border #004330
panel.background #001d15
panel.border #006b39
panelSection.border #006b39
panelTitle.activeBorder #006b39
panelTitle.activeForeground #00d16f
panelTitle.inactiveForeground #00d16f76
peekView.border #007acc
peekViewEditor.background #001f33
peekViewEditor.matchHighlightBackground #ff8f0099
peekViewEditor.matchHighlightBorder #ee931e
peekViewEditorGutter.background #001f33
peekViewResult.background #252526
peekViewResult.fileForeground #ffffff
peekViewResult.lineForeground #bbbbbb
peekViewResult.matchHighlightBackground #ea5c004d
peekViewResult.selectionBackground #3399ff33
peekViewResult.selectionForeground #ffffff
peekViewTitle.background #1e1e1e
peekViewTitleDescription.foreground #ccccccb3
peekViewTitleLabel.foreground #ffffff
pickerGroup.border #004330
pickerGroup.foreground #86ffc6
progressBar.background #006b39
scrollbar.shadow #00000070
scrollbarSlider.activeBackground #0c4f38
scrollbarSlider.background #16825d
scrollbarSlider.hoverBackground #16825daf
selection.background #006b39
settings.focusedRowBackground #ffffff07
settings.headerForeground #ffffff
sideBar.background #002a1e
sideBar.border #004330
sideBar.dropBackground #002118
sideBar.foreground #cccccc
sideBarSectionHeader.background #004330
sideBarSectionHeader.border #cccccc00
sideBarSectionHeader.foreground #cccccc
sideBarTitle.foreground #bbbbbb
statusBar.background #002a1e
statusBar.border #006b39
statusBar.debuggingBackground #412100
statusBar.debuggingBorder #006b39
statusBar.debuggingForeground #ffffff
statusBar.foreground #ffffff
statusBar.noFolderBackground #002a1e
statusBar.noFolderBorder #006b39
statusBar.noFolderForeground #ffffff
statusBarItem.activeBackground #FFFFFF25
statusBarItem.hoverBackground #004330cb
statusBarItem.remoteBackground #16825d
statusBarItem.remoteForeground #ffffff
tab.activeBackground #004330
tab.activeBorder #00000000
tab.activeBorderTop #00000000
tab.activeForeground #ffffff
tab.border #16825d
tab.hoverBackground #002a1e
tab.inactiveBackground #0043307c
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 #006b39
terminal.foreground #cccccc
terminal.selectionBackground #006b3952
terminalCursor.background #006649
terminalCursor.foreground #ffffff
textLink.foreground #00d572
titleBar.activeBackground #002a1e
titleBar.activeForeground #cccccc
titleBar.border #006b39
titleBar.inactiveBackground #001b13
titleBar.inactiveForeground #cccccc99
tree.indentGuidesStroke #006b39
walkThrough.embeddedEditorBackground #00000050
widget.shadow #0000005c #c46b6b
punctuation.separator.period.python,punctuation.separator.element.python,punctuation.parenthesis.begin.python,punctuation.parenthesis.end.python #99d9b2 —
variable.parameter.function.language.special.self.python #a776ab —
storage.modifier.lifetime.rust #99d9b2 —
support.function.std.rust #538bad —
entity.name.lifetime.rust #a776ab —
variable.language.rust #c46b6b —
support.constant.edge #bcbe71 —
constant.other.character-class.regexp #c46b6b —
keyword.operator.quantifier.regexp #64a162 —
punctuation.definition.string.begin,punctuation.definition.string.end #b08248 —
variable.parameter.function #99d9b2 —
comment markup.link #64866481 —
markup.changed.diff #a776ab —
meta.diff.header.from-file,meta.diff.header.to-file,punctuation.definition.from-file.diff,punctuation.definition.to-file.diff #538bad —
markup.inserted.diff #b08248 —
markup.deleted.diff #c46b6b —
meta.function.c,meta.function.cpp #c46b6b —
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 #99d9b2 —
punctuation.separator.key-value #99d9b2 —
keyword.operator.expression.import #538bad italic
support.constant.math #a776ab —
support.constant.property.math #64a162 —
variable.other.constant #a776ab bold
storage.type.annotation.java, storage.type.object.array.java #a776ab —
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 #99d9b2 —
storage.modifier.import.java,storage.type.java,storage.type.generic.java #a776ab —
keyword.operator.instanceof.java #bcbe71 —
meta.definition.variable.name.java #c46b6b —
keyword.operator.logical #b48b57 —
keyword.operator.bitwise #b48b57 —
keyword.operator.channel #b48b57 —
support.constant.property-value.scss,support.constant.property-value.css #64a162 —
keyword.operator.css,keyword.operator.scss,keyword.operator.less #b48b57 —
support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss #64a162 —
punctuation.separator.list.comma.css #99d9b2 —
support.constant.color.w3c-standard-color-name.css #64a162 —
support.type.vendored.property-name.css #b48b57 bold
support.module.node,support.type.object.module,support.module.node #a776ab italic
entity.name.type.module #a776ab —
variable.other.readwrite,meta.object-literal.key,support.variable.property,support.variable.object.process,support.variable.object.node #c46b6b —
support.constant.json #64a162 —
keyword.operator.expression.instanceof, keyword.operator.new, keyword.operator.ternary, keyword.operator.optional, keyword.operator.expression.keyof #bcbe71 bold
support.type.object.console #c46b6b —
support.variable.property.process #64a162 —
entity.name.function,support.function.console #538bad italic bold
keyword.operator.misc.rust #99d9b2 —
keyword.operator.sigil.rust #bcbe71 —
keyword.operator.delete #bcbe71 —
support.type.object.dom #b48b57 —
support.variable.dom,support.variable.property.dom #c46b6b —
keyword.operator.arithmetic,keyword.operator.comparison,keyword.operator.decrement,keyword.operator.increment,keyword.operator.relational #b48b57 —
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 #bcbe71 —
punctuation.separator.delimiter #99d9b2 —
punctuation.separator.c,punctuation.separator.cpp #bcbe71 —
support.type.posix-reserved.c,support.type.posix-reserved.cpp #b48b57 —
keyword.operator.sizeof.c,keyword.operator.sizeof.cpp #bcbe71 —
variable.parameter.function.language.python #64a162 —
support.type.python #b48b57 —
keyword.operator.logical.python #bcbe71 —
variable.parameter.function.python #64a162 —
punctuation.definition.arguments.begin.python,punctuation.definition.arguments.end.python,punctuation.separator.arguments.python,punctuation.definition.list.begin.python,punctuation.definition.list.end.python #99d9b2 —
meta.function-call.generic.python #538bad —
constant.character.format.placeholder.other.python #64a162 —
keyword.operator.assignment.compound #bcbe71 —
keyword.operator.assignment.compound.js,keyword.operator.assignment.compound.ts #b48b57 —
entity.name.namespace #a776ab —
variable.language #a776ab —
token.variable.parameter.java #99d9b2 —
import.storage.java #a776ab —
token.package.keyword #bcbe71 —
entity.name.function, meta.require, support.function.any-method, variable.function #538bad —
entity.name.type.namespace #a776ab —
support.class, entity.name.type.class #a776ab —
entity.name.class.identifier.namespace.type #a776ab —
entity.name.class, variable.other.class.js, variable.other.class.ts #a776ab —
variable.other.class.php #c46b6b —
control.elements, keyword.operator.less #64a162 —
keyword.other.special-method #538bad —
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 #bcbe71 bold
token.storage.type.java #a776ab —
support.type.property-name #99d9b2 —
support.constant.property-value #99d9b2 —
support.constant.font-name #64a162 —
entity.other.inherited-class #a776ab —
constant.other.symbol #b48b57 —
punctuation.definition.constant #64a162 —
entity.other.attribute-name #64a162 —
entity.other.attribute-name.id #538bad —
entity.other.attribute-name.class.css #64a162 —
markup.heading punctuation.definition.heading, entity.name.section #538bad —
keyword.other.unit #c46b6b —
markup.bold,todo.bold #64a162 —
punctuation.definition.bold #a776ab —
markup.italic, punctuation.definition.italic,todo.emphasis #bcbe71 —
entity.name.section.markdown #c46b6b —
punctuation.definition.heading.markdown #c46b6b —
punctuation.definition.list.begin.markdown #c46b6b —
markup.heading.setext #99d9b2 —
punctuation.definition.bold.markdown #64a162 —
markup.inline.raw.markdown #b08248 —
markup.inline.raw.string.markdown #b08248 —
punctuation.definition.list.markdown #c46b6b —
punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown #c46b6b —
beginning.punctuation.definition.list.markdown #c46b6b —
punctuation.definition.metadata.markdown #c46b6b —
markup.underline.link.markdown,markup.underline.link.image.markdown #bcbe71 —
string.other.link.title.markdown,string.other.link.description.markdown #538bad —
constant.character.escape #b48b57 —
punctuation.section.embedded, variable.interpolation #c46b6b —
punctuation.section.embedded.begin,punctuation.section.embedded.end #bcbe71 —
invalid.illegal.bad-ampersand.html #99d9b2 —
invalid.deprecated #ffffff —
invalid.unimplemented #ffffff —
source.json meta.structure.dictionary.json > string.quoted.json #c46b6b —
source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string #c46b6b —
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 #b08248 —
source.json meta.structure.dictionary.json > constant.language.json,source.json meta.structure.array.json > constant.language.json #b48b57 —
support.type.property-name.json #c46b6b —
support.type.property-name.json punctuation #c46b6b —
text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade #bcbe71 —
text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade #bcbe71 —
support.other.namespace.use.php,support.other.namespace.use-as.php,support.other.namespace.php,entity.other.alias.php,meta.interface.php #a776ab —
keyword.operator.error-control.php #bcbe71 —
keyword.operator.type.php #bcbe71 —
punctuation.section.array.begin.php #99d9b2 —
punctuation.section.array.end.php #99d9b2 —
invalid.illegal.non-null-typehinted.php #f44747 —
storage.type.php,meta.other.type.phpdoc.php,keyword.other.type.php,keyword.other.array.phpdoc.php #a776ab —
meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php #538bad —
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 #99d9b2 —
support.constant.core.rust #64a162 —
support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php #64a162 —
entity.name.goto-label.php,support.other.php #538bad —
keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php #b48b57 —
keyword.operator.regexp.php #bcbe71 —
keyword.operator.comparison.php #b48b57 —
keyword.operator.heredoc.php,keyword.operator.nowdoc.php #bcbe71 —
meta.function.decorator.python #538bad —
support.token.decorator.python,meta.function.decorator.identifier.python #b48b57 —
function.parameter #99d9b2 —
function.parameter.ruby, function.parameter.cs #99d9b2 —
constant.language.symbol.ruby #b48b57 —
inline-color-decoration rgb-value #64a162 —
support.type.primitive.ts,support.type.builtin.ts,support.type.primitive.tsx,support.type.builtin.tsx #a776ab —
block.scope.end,block.scope.begin #99d9b2 —
entity.name.variable.local.cs #c46b6b —
token.error-token #f44747 —
token.debug-token #bcbe71 —
punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded #bcbe71 —
meta.template.expression #99d9b2 —
keyword.operator.module #bcbe71 —
support.type.type.flowtype #538bad —
support.type.primitive #a776ab —
meta.property.object #c46b6b —
variable.parameter.function.js #c46b6b —
keyword.other.template.begin #b08248 —
keyword.other.template.end #b08248 —
keyword.other.substitution.begin #b08248 —
keyword.other.substitution.end #b08248 —
keyword.operator.assignment #b48b57 —
keyword.operator.assignment.go #a776ab —
keyword.operator.arithmetic.go, keyword.operator.address.go #bcbe71 —
entity.name.package.go #a776ab —
support.type.prelude.elm #b48b57 —
support.constant.elm #64a162 —
punctuation.quasi.element #bcbe71 —
constant.character.entity #c46b6b —
entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class #b48b57 —
entity.global.clojure #a776ab —
meta.symbol.clojure #c46b6b —
constant.keyword.clojure #b48b57 —
meta.arguments.coffee, variable.parameter.function.coffee #c46b6b —
meta.scope.prerequisites.makefile #c46b6b —
storage.modifier.import.groovy #a776ab —
meta.method.groovy #538bad —
meta.definition.variable.name.groovy #c46b6b —
meta.definition.class.inherited.classes.groovy #b08248 —
support.variable.semantic.hlsl #a776ab —
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 #bcbe71 —
text.variable, text.bracketed #c46b6b —
support.type.swift, support.type.vb.asp #a776ab —
entity.name.function.xi #a776ab —
entity.name.class.xi #b48b57 —
constant.character.character-class.regexp.xi #c46b6b —
constant.regexp.xi #bcbe71 —
keyword.control.xi #b48b57 —
beginning.punctuation.definition.quote.markdown.xi #b08248 —
beginning.punctuation.definition.list.markdown.xi #64866481 —
constant.character.xi #538bad —
constant.other.color.rgb-value.xi #ffffff —
punctuation.definition.tag.xi #64866481 —
entity.name.label.cs, entity.name.scope-resolution.function.call, entity.name.scope-resolution.function.definition #a776ab —
entity.name.label.cs, markup.heading.setext.1.markdown, markup.heading.setext.2.markdown #c46b6b —
meta.brace.square #99d9b2 —
comment, punctuation.definition.comment #64866481 italic
markup.quote.markdown #64866481 —
punctuation.definition.block.sequence.item.yaml #99d9b2 —
constant.language.symbol.elixir #b48b57 —
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 } !` ;
}