Skip to main content
Home Theme VS Code Modern Warfare Theme Theme inspired by the color palette (mostly the green) from Call of Duty: Modern Warfare 2 (2009). I am not affiliated, associated, authorized, endorsed by, or in any way officially connected with Activision. The classic-looking font I think is is T.26 Carbon: https://www.t26.com/fonts/86-Carbon.
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 #d4fdd22e activityBar.background #4d4b4c activityBar.border #d4fdd2 activityBar.foreground #d4fdd2 activityBar.inactiveForeground #d4fdd26a activityBarBadge.background #f2e783 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 #d4fdd2 — variable.other.generic-type.haskell #f2e783 — storage.type.haskell #b3b9c5 — support.variable.magic.python
Shiki preview TypeScript sample highlighted with this variant's colors and tokenColors.
Modern Warfare Theme — Modern Warfare (2009) Theme
activityBarBadge.foreground #242324
badge.background #f2e783
badge.foreground #242324
breadcrumb.activeSelectionForeground #d4fdd2
breadcrumb.background #242324
breadcrumb.focusForeground #d4fdd2
breadcrumb.foreground #b3b9c5
button.background #d4fdd2
button.foreground #242324
button.hoverBackground #83ff7d
button.secondaryBackground #2d2d2d
button.secondaryForeground #d4fdd2
button.secondaryHoverBackground #3996359f
checkbox.background #676669
checkbox.border #d4fdd2
checkbox.foreground #ffffff
debugExceptionWidget.background #2d2d2d
debugExceptionWidget.border #f2e783
debugToolBar.background #2d2d2d
debugToolBar.border #f2e783
diffEditor.border #d4fdd2
diffEditor.insertedTextBackground #d4fdd238
diffEditor.insertedTextBorder #d4fdd200
diffEditor.removedTextBackground #e45c5f38
diffEditor.removedTextBorder #e45c5f00
dropdown.background #676669
dropdown.border #d4fdd2
dropdown.foreground #ffffff
editor.background #4d4b4c
editor.findMatchBackground #d4fdd236
editor.findMatchBorder #d4fdd2dd
editor.findMatchHighlightBackground #f0e79b36
editor.findMatchHighlightBorder #f2e783
editor.findRangeHighlightBackground #24232432
editor.findRangeHighlightBorder #ffffff00
editor.foldBackground #f0e79b3a
editor.foreground #ffffff
editor.hoverHighlightBackground #d4fdd230
editor.inactiveSelectionBackground #5d905a32
editor.lineHighlightBackground #383838
editor.lineHighlightBorder #d4fdd200
editor.rangeHighlightBackground #ffffff00
editor.rangeHighlightBorder #d4fdd26a
editor.selectionBackground #d4fdd232
editor.selectionHighlightBackground #d4fdd23a
editor.selectionHighlightBorder #d4fdd272
editor.wordHighlightBackground #2423245e
editor.wordHighlightBorder #d4fdd285
editor.wordHighlightStrongBackground #d4fdd21e
editor.wordHighlightStrongBorder #d4fdd28d
editorBracketHighlight.foreground1 #f2e783
editorBracketHighlight.foreground2 #93bef9
editorBracketHighlight.foreground3 #ffc161c5
editorBracketHighlight.foreground4 #d4fdd2
editorBracketHighlight.foreground5 #e45c5f
editorBracketHighlight.foreground6 #ffffff
editorBracketHighlight.unexpectedBracket.foreground #e45c5f
editorBracketMatch.background #e45c5f
editorBracketMatch.border #e45c5f00
editorCodeLens.foreground #ffc161c5
editorCursor.background #242324
editorCursor.foreground #d4fdd2
editorError.background #e45c5f3a
editorError.border #ffffff00
editorError.foreground #e45c5f
editorGroup.border #d4fdd2
editorGroup.emptyBackground #4d4b4c
editorGroupHeader.border #d4fdd289
editorGroupHeader.tabsBackground #2d2d2d
editorGroupHeader.tabsBorder #d4fdd200
editorGutter.addedBackground #d4fdd2
editorGutter.background #2d2d2d
editorGutter.commentRangeForeground #f2e783
editorGutter.deletedBackground #e45c5f
editorGutter.foldingControlForeground #f2e783
editorGutter.modifiedBackground #93bef9
editorHoverWidget.background #242324
editorHoverWidget.border #d4fdd2
editorHoverWidget.foreground #b3b9c5
editorIndentGuide.activeBackground #d4fdd2
editorIndentGuide.background #b3b9c5
editorInfo.background #93bef924
editorInfo.border #4490BF00
editorInfo.foreground #93bef9
editorLineNumber.activeForeground #d4fdd2
editorLineNumber.foreground #b3b9c5
editorLink.activeForeground #83ff7d
editorMarkerNavigation.background #242324
editorMarkerNavigationError.background #e45c5f
editorMarkerNavigationInfo.background #93bef9
editorMarkerNavigationWarning.background #f2e783
editorOverviewRuler.background #d4fdd22c
editorOverviewRuler.border #d4fdd2
editorRuler.foreground #d4fdd26a
editorSuggestWidget.background #242324
editorSuggestWidget.border #d4fdd2
editorSuggestWidget.foreground #b3b9c5
editorSuggestWidget.highlightForeground #d4fdd2
editorSuggestWidget.selectedBackground #d4fdd22e
editorWarning.background #f0e79b28
editorWarning.border #ffffff00
editorWarning.foreground #f2e783
editorWhitespace.foreground #d4fdd2
editorWidget.background #242324
editorWidget.foreground #676669
editorWidget.resizeBorder #d4fdd2
focusBorder #d4fdd2
foreground #ffffff
gitDecoration.addedResourceForeground #d4fdd2
gitDecoration.conflictingResourceForeground #93bef9
gitDecoration.deletedResourceForeground #e45c5f
gitDecoration.ignoredResourceForeground #aaaaa8
gitDecoration.modifiedResourceForeground #f2e783
gitDecoration.stageDeletedResourceForeground #e45c5f
gitDecoration.stageModifiedResourceForeground #f2e783
gitDecoration.submoduleResourceForeground #8db9e2
gitDecoration.untrackedResourceForeground #84ff7e
icon.foreground #ffffff
input.background #676669
input.border #d4fdd2
input.foreground #ffffff
input.placeholderForeground #b3b9c5
inputOption.activeBackground #d4fdd234
inputOption.activeBorder #d4fdd2
inputOption.activeForeground #ffffff
list.activeSelectionBackground #d4fdd22e
list.activeSelectionForeground #d4fdd2
list.dropBackground #4d4b4c
list.focusBackground #d4fdd22e
list.focusForeground #b3b9c5
list.highlightForeground #d4fdd2
list.hoverBackground #d4fdd25a
list.hoverForeground #ffffff
list.inactiveSelectionBackground #d4fdd22c
list.inactiveSelectionForeground #ffffff
listFilterWidget.background #beb77a
listFilterWidget.noMatchesOutline #e45c5f
listFilterWidget.outline #f0e79b00
menu.background #242324
menu.border #d4fdd2
menu.foreground #b3b9c5
menu.selectionBackground #d4fdd24c
menu.selectionBorder #d4fdd2
menu.selectionForeground #ffffff
menu.separatorBackground #d4fdd2
menubar.selectionBackground #d4fdd22a
menubar.selectionBorder #d4fdd2
menubar.selectionForeground #d4fdd2
merge.commonContentBackground #282828
merge.commonHeaderBackground #383838
merge.currentContentBackground #4a7947
merge.currentHeaderBackground #63b05ffd
merge.incomingContentBackground #28518a
merge.incomingHeaderBackground #549cff
minimap.background #4d4b4c
minimap.errorHighlight #e45c5f
minimap.findMatchHighlight #d4fdd236
minimap.selectionHighlight #d4fdd232
minimap.warningHighlight #f2e783
minimapGutter.addedBackground #d4fdd2
minimapGutter.deletedBackground #e45c5f
minimapGutter.modifiedBackground #93bef9
notificationCenter.border #d4fdd2
notificationCenterHeader.background #d4fdd2
notificationCenterHeader.foreground #cccccc
notifications.background #242324
notifications.border #d4fdd2
notifications.foreground #b3b9c5
notificationsErrorIcon.foreground #e45c5f
notificationsInfoIcon.foreground #93bef9
notificationsWarningIcon.foreground #f2e783
notificationToast.border #d4fdd2
panel.background #242324
panel.border #d4fdd2
panelSection.border #d4fdd2
panelTitle.activeBorder #d4fdd2
panelTitle.activeForeground #d4fdd2
panelTitle.inactiveForeground #ffffff
peekView.border #d4fdd2
peekViewEditor.background #242324
peekViewEditor.matchHighlightBackground #f0e79b32
peekViewEditor.matchHighlightBorder #f0e79ba7
peekViewEditorGutter.background #d4fdd230
peekViewResult.background #242324
peekViewResult.fileForeground #cccccc
peekViewResult.lineForeground #f2e783
peekViewResult.matchHighlightBackground #f0e79b40
peekViewResult.selectionBackground #d4fdd24e
peekViewResult.selectionForeground #d4fdd2
peekViewTitle.background #242324
peekViewTitleDescription.foreground #b3b9c5
peekViewTitleLabel.foreground #ffffff
pickerGroup.border #d4fdd2
pickerGroup.foreground #83ff7d
progressBar.background #d4fdd2
scrollbar.shadow #00000000
scrollbarSlider.activeBackground #83ff7d
scrollbarSlider.background #d4fdd260
scrollbarSlider.hoverBackground #83ff7d
selection.background #d4fdd22e
settings.focusedRowBackground #ffffff07
settings.headerForeground #ffffff
sideBar.background #676669
sideBar.border #d4fdd2
sideBar.dropBackground #4d4b4c
sideBar.foreground #ffffff
sideBarSectionHeader.background #d4fdd22e
sideBarSectionHeader.border #d4fdd2
sideBarSectionHeader.foreground #ffffff
sideBarTitle.foreground #ffffff
statusBar.background #d4fdd2
statusBar.border #d4fdd2
statusBar.debuggingBackground #e45c5f
statusBar.debuggingForeground #ffffff
statusBar.foreground #4d4b4c
statusBar.noFolderBackground #f2e783
statusBar.noFolderForeground #4d4b4c
statusBarItem.activeBackground #FFFFFF25
statusBarItem.hoverBackground #00000010
statusBarItem.remoteBackground #676669
statusBarItem.remoteForeground #d4fdd2
tab.activeBackground #242324
tab.activeBorder #00000000
tab.activeBorderTop #00000000
tab.activeForeground #d4fdd2
tab.border #d4fdd2
tab.hoverBackground #d4fdd22c
tab.hoverBorder #d4fdd2
tab.hoverForeground #d4fdd2
tab.inactiveBackground #2d2d2d
tab.inactiveForeground #ffffff
terminal.ansiBlack #000000
terminal.ansiBlue #3262a5
terminal.ansiBrightBlack #676669
terminal.ansiBrightBlue #93bef9
terminal.ansiBrightCyan #62fdfd
terminal.ansiBrightGreen #83ff7d
terminal.ansiBrightMagenta #e65de6
terminal.ansiBrightRed #f03338
terminal.ansiBrightWhite #ffffff
terminal.ansiBrightYellow #ffec4a
terminal.ansiCyan #a0eaea
terminal.ansiGreen #d4fdd2
terminal.ansiMagenta #e291e2
terminal.ansiRed #e45c5f
terminal.ansiWhite #cccccc
terminal.ansiYellow #f2e783
terminal.border #d4fdd2
terminal.foreground #b3b9c5
terminal.selectionBackground #d4fdd22e
terminalCursor.background #d4fdd2
terminalCursor.foreground #4d4b4c
textLink.foreground #83ff7d
titleBar.activeBackground #242324
titleBar.activeForeground #b3b9c5
titleBar.border #d4fdd2
titleBar.inactiveBackground #4d4b4c
titleBar.inactiveForeground #cccccc99
tree.indentGuidesStroke #d4fdd2d9
walkThrough.embeddedEditorBackground #00000050
widget.shadow #00000000 #d4fdd2
punctuation.separator.period.python,punctuation.separator.element.python,punctuation.parenthesis.begin.python,punctuation.parenthesis.end.python #ffffff —
variable.parameter.function.language.special.self.python #e45c5f —
storage.modifier.lifetime.rust #ffffff —
support.function.std.rust #93bef9 —
entity.name.lifetime.rust #e45c5f —
variable.language.rust #d4fdd2 —
support.constant.edge #f2e783 —
constant.other.character-class.regexp #d4fdd2 —
keyword.operator.quantifier.regexp #b3b9c5 —
punctuation.definition.string.begin,punctuation.definition.string.end #98c379 —
variable.parameter.function #ffffff —
comment markup.link #7f848e —
markup.changed.diff #e45c5f —
meta.diff.header.from-file,meta.diff.header.to-file,punctuation.definition.from-file.diff,punctuation.definition.to-file.diff #93bef9 —
markup.inserted.diff #98c379 —
markup.deleted.diff #d4fdd2 —
meta.function.c,meta.function.cpp #d4fdd2 —
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 #93bef9 —
support.constant.math #e45c5f —
support.constant.property.math #b3b9c5 —
variable.other.constant #e45c5f —
storage.type.annotation.java, storage.type.object.array.java #e45c5f —
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 #e45c5f —
keyword.operator.instanceof.java #f2e783 —
meta.definition.variable.name.java #d4fdd2 —
keyword.operator.logical #93bef9 —
keyword.operator.bitwise #93bef9 —
keyword.operator.channel #93bef9 —
support.constant.property-value.scss,support.constant.property-value.css #b3b9c5 —
keyword.operator.css,keyword.operator.scss,keyword.operator.less #93bef9 —
support.constant.color.w3c-standard-color-name.css,support.constant.color.w3c-standard-color-name.scss #b3b9c5 —
punctuation.separator.list.comma.css #ffffff —
support.constant.color.w3c-standard-color-name.css #b3b9c5 —
support.type.vendored.property-name.css #93bef9 —
support.module.node,support.type.object.module,support.module.node #e45c5f —
entity.name.type.module #e45c5f —
variable.other.readwrite,meta.object-literal.key,support.variable.property,support.variable.object.process,support.variable.object.node #d4fdd2 —
support.constant.json #b3b9c5 —
keyword.operator.expression.instanceof, keyword.operator.new, keyword.operator.ternary, keyword.operator.optional, keyword.operator.expression.keyof #f2e783 —
support.type.object.console #d4fdd2 —
support.variable.property.process #b3b9c5 —
entity.name.function,support.function.console #93bef9 —
keyword.operator.misc.rust #ffffff —
keyword.operator.sigil.rust #f2e783 —
keyword.operator.delete #f2e783 —
support.type.object.dom #93bef9 —
support.variable.dom,support.variable.property.dom #d4fdd2 —
keyword.operator.arithmetic,keyword.operator.comparison,keyword.operator.decrement,keyword.operator.increment,keyword.operator.relational #93bef9 —
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 #f2e783 —
punctuation.separator.delimiter #ffffff —
punctuation.separator.c,punctuation.separator.cpp #f2e783 —
support.type.posix-reserved.c,support.type.posix-reserved.cpp #93bef9 —
keyword.operator.sizeof.c,keyword.operator.sizeof.cpp #f2e783 —
variable.parameter.function.language.python #b3b9c5 —
support.type.python #93bef9 —
keyword.operator.logical.python #f2e783 —
variable.parameter.function.python #b3b9c5 —
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 #93bef9 —
constant.character.format.placeholder.other.python #b3b9c5 —
keyword.operator.assignment.compound #f2e783 —
keyword.operator.assignment.compound.js,keyword.operator.assignment.compound.ts #93bef9 —
entity.name.namespace #e45c5f —
variable.language #e45c5f —
token.variable.parameter.java #ffffff —
import.storage.java #e45c5f —
token.package.keyword #f2e783 —
entity.name.function, meta.require, support.function.any-method, variable.function #93bef9 —
entity.name.type.namespace #e45c5f —
support.class, entity.name.type.class #e45c5f —
entity.name.class.identifier.namespace.type #e45c5f —
entity.name.class, variable.other.class.js, variable.other.class.ts #e45c5f —
variable.other.class.php #d4fdd2 —
control.elements, keyword.operator.less #b3b9c5 —
keyword.other.special-method #93bef9 —
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 #f2e783 —
token.storage.type.java #e45c5f —
support.type.property-name #ffffff —
support.constant.property-value #ffffff —
support.constant.font-name #b3b9c5 —
entity.other.inherited-class #e45c5f —
constant.other.symbol #93bef9 —
punctuation.definition.constant #b3b9c5 —
entity.other.attribute-name #b3b9c5 —
entity.other.attribute-name.id #93bef9 normal
entity.other.attribute-name.class.css #b3b9c5 normal
markup.heading punctuation.definition.heading, entity.name.section #93bef9 —
keyword.other.unit #d4fdd2 —
markup.bold,todo.bold #b3b9c5 —
punctuation.definition.bold #e45c5f —
markup.italic, punctuation.definition.italic,todo.emphasis #f2e783 —
entity.name.section.markdown #d4fdd2 —
punctuation.definition.heading.markdown #d4fdd2 —
punctuation.definition.list.begin.markdown #d4fdd2 —
markup.heading.setext #ffffff —
punctuation.definition.bold.markdown #b3b9c5 —
markup.inline.raw.markdown #98c379 —
markup.inline.raw.string.markdown #98c379 —
punctuation.definition.list.markdown #d4fdd2 —
punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown #d4fdd2 —
beginning.punctuation.definition.list.markdown #d4fdd2 —
punctuation.definition.metadata.markdown #d4fdd2 —
markup.underline.link.markdown,markup.underline.link.image.markdown #f2e783 —
string.other.link.title.markdown,string.other.link.description.markdown #93bef9 —
constant.character.escape #93bef9 —
punctuation.section.embedded, variable.interpolation #d4fdd2 —
punctuation.section.embedded.begin,punctuation.section.embedded.end #f2e783 —
invalid.illegal.bad-ampersand.html #ffffff —
invalid.deprecated #ffffff —
invalid.unimplemented #ffffff —
source.json meta.structure.dictionary.json > string.quoted.json #d4fdd2 —
source.json meta.structure.dictionary.json > string.quoted.json > punctuation.string #d4fdd2 —
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 #98c379 —
source.json meta.structure.dictionary.json > constant.language.json,source.json meta.structure.array.json > constant.language.json #93bef9 —
support.type.property-name.json #d4fdd2 —
support.type.property-name.json punctuation #d4fdd2 —
text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade #f2e783 —
text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade #f2e783 —
support.other.namespace.use.php,support.other.namespace.use-as.php,support.other.namespace.php,entity.other.alias.php,meta.interface.php #e45c5f —
keyword.operator.error-control.php #f2e783 —
keyword.operator.type.php #f2e783 —
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 #e45c5f —
meta.function-call.php,meta.function-call.object.php,meta.function-call.static.php #93bef9 —
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 #b3b9c5 —
support.constant.ext.php,support.constant.std.php,support.constant.core.php,support.constant.parser-token.php #b3b9c5 —
entity.name.goto-label.php,support.other.php #93bef9 —
keyword.operator.logical.php,keyword.operator.bitwise.php,keyword.operator.arithmetic.php #93bef9 —
keyword.operator.regexp.php #f2e783 —
keyword.operator.comparison.php #93bef9 —
keyword.operator.heredoc.php,keyword.operator.nowdoc.php #f2e783 —
meta.function.decorator.python #93bef9 —
support.token.decorator.python,meta.function.decorator.identifier.python #93bef9 —
function.parameter #ffffff —
function.parameter.ruby, function.parameter.cs #ffffff —
constant.language.symbol.ruby #93bef9 —
inline-color-decoration rgb-value #b3b9c5 —
support.type.primitive.ts,support.type.builtin.ts,support.type.primitive.tsx,support.type.builtin.tsx #e45c5f —
block.scope.end,block.scope.begin #ffffff —
entity.name.variable.local.cs #d4fdd2 —
token.error-token #f44747 —
token.debug-token #f2e783 —
punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded #f2e783 —
meta.template.expression #ffffff —
keyword.operator.module #f2e783 —
support.type.type.flowtype #93bef9 —
support.type.primitive #e45c5f —
meta.property.object #d4fdd2 —
variable.parameter.function.js #d4fdd2 —
keyword.other.template.begin #98c379 —
keyword.other.template.end #98c379 —
keyword.other.substitution.begin #98c379 —
keyword.other.substitution.end #98c379 —
keyword.operator.assignment #93bef9 —
keyword.operator.assignment.go #e45c5f —
keyword.operator.arithmetic.go, keyword.operator.address.go #f2e783 —
entity.name.package.go #e45c5f —
support.type.prelude.elm #93bef9 —
support.constant.elm #b3b9c5 —
punctuation.quasi.element #f2e783 —
constant.character.entity #d4fdd2 —
entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class #93bef9 —
entity.global.clojure #e45c5f —
meta.symbol.clojure #d4fdd2 —
constant.keyword.clojure #93bef9 —
meta.arguments.coffee, variable.parameter.function.coffee #d4fdd2 —
meta.scope.prerequisites.makefile #d4fdd2 —
storage.modifier.import.groovy #e45c5f —
meta.method.groovy #93bef9 —
meta.definition.variable.name.groovy #d4fdd2 —
meta.definition.class.inherited.classes.groovy #98c379 —
support.variable.semantic.hlsl #e45c5f —
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 #f2e783 —
text.variable, text.bracketed #d4fdd2 —
support.type.swift, support.type.vb.asp #e45c5f —
entity.name.function.xi #e45c5f —
entity.name.class.xi #93bef9 —
constant.character.character-class.regexp.xi #d4fdd2 —
constant.regexp.xi #f2e783 —
keyword.control.xi #93bef9 —
beginning.punctuation.definition.quote.markdown.xi #98c379 —
beginning.punctuation.definition.list.markdown.xi #7f848e —
constant.character.xi #93bef9 —
constant.other.color.rgb-value.xi #ffffff —
punctuation.definition.tag.xi #7f848e —
entity.name.label.cs, entity.name.scope-resolution.function.call, entity.name.scope-resolution.function.definition #e45c5f —
entity.name.label.cs, markup.heading.setext.1.markdown, markup.heading.setext.2.markdown #d4fdd2 —
meta.brace.square #ffffff —
comment, punctuation.definition.comment #7f848e italic
markup.quote.markdown #7f848e —
punctuation.definition.block.sequence.item.yaml #ffffff —
constant.language.symbol.elixir #93bef9 —
entity.other.attribute-name.js,entity.other.attribute-name.ts,entity.other.attribute-name.jsx,entity.other.attribute-name.tsx,variable.parameter,variable.language.super — italic
comment.line.double-slash,comment.block.documentation — italic
keyword.control.import.python,keyword.control.flow.python — italic
markup.italic.markdown — italic
export interface User {
id : string ;
name : string ;
role : "admin" | "member" ;
tags : string [];
}
/**
* Fetch user data by ID
* @param id
* @returns User object or null if ID is invalid
*/
export async function fetchUser ( id : string ): Promise < User | null > {
if ( ! id ) {
return null ;
}
const response = await fetch ( `/api/users/ ${ id } ` , {
method : "GET" ,
headers : { Accept : "application/json" },
});
if ( ! response . ok ) {
throw new Error ( `HTTP ${ response . status } ` );
}
return ( await response . json ()) as User ;
}
function greet ( user : User ): string {
// Simple greeting function that uses the user's name
return `Hello, ${ user . name } !` ;
}
fetchUser.ts
index.ts
README.md
src
components
fetchUser.ts
src
components
fetchUser.ts
fetchUser 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Problems1
Output
Debug Console
Terminal
Ports
~/my-project $ pnpm dev
▲ Next.js ready on http://localhost:3000
✓ compiled client and server successfully in 412ms
wait - compiling /theme/vscode...
~/my-project
main*
Button.tsx
31
$
export interface User {
id : string ;
name : string ;
role : "admin" | "member" ;
tags : string [];
}
/**
* Fetch user data by ID
* @param id
* @returns User object or null if ID is invalid
*/
export async function fetchUser ( id : string ): Promise < User | null > {
if ( ! id ) {
return null ;
}
const response = await fetch ( `/api/users/ ${ id } ` , {
method : "GET" ,
headers : { Accept : "application/json" },
});
if ( ! response . ok ) {
throw new Error ( `HTTP ${ response . status } ` );
}
return ( await response . json ()) as User ;
}
function greet ( user : User ): string {
// Simple greeting function that uses the user's name
return `Hello, ${ user . name } !` ;
}
Modern Warfare Theme | Coding Theme