Midnight Code
Publisher: akmar nafiThemes in package: 1
Dark VS Code Theme
Dark VS Code Theme
Full workbench mockup using this variant's colors and tokenColors.
Loading...
Workbench UI color keys from the theme JSON colors map.
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| comment, string.comment | #676f7d | — |
| string, string.template | #e5c07b | — |
| constant.numeric | #c678dd | — |
| string.embedded.begin, string.embedded.end, punctuation.definition.template-expression, punctuation.section.embedded | #c678dd | — |
| punctuation.section.embedded.begin.js, punctuation.section.embedded.end.js, punctuation.section.embedded.begin.erb, punctuation.section.embedded.end.erb, source.elixir.embedded, punctuation.separator, punctuation.accessor, meta.brace | #abb2bf | — |
| constant.language | #56b6c2 | — |
| constant.character, constant.other | #56b6c2 | — |
| variable.language | #e06c75 | — |
| keyword, keyword.operator.logical, keyword.operator.constructor | #e06c75 | — |
| keyword.operator | #e06c75 | — |
| storage | #e06c75 | — |
| storage.type | #56b6c2 | — |
| entity.name.class, entity.name.module, entity.name.type, storage.identifier, support.class | #61afef | — |
| variable.other.object, variable.other.constant, variable.other.global, variable.other.readwrite.class, variable.other.readwrite.instance, variable.other.readwrite.batchfile, variable.readwrite, variable.readwrite.other.block | #61afef | — |
| variable.other, variable.other.property, variable.other.block | #abb2bf | — |
| entity.other.inherited-class | #98c379 | — |
| storage.modifier.import, storage.modifier.package | #61afef | — |
| entity.name.function, support.function | #98c379 | — |
| variable.parameter, entity.name.variable.parameter, parameter.variable | #d19a66 | italic |
| entity.name.function-call | #abb2bf | — |
| function.support.builtin, function.support.core | #98c379 | — |
| entity.name.tag, entity.name.tag.class.js | #e06c75 | — |
| entity.name.tag.class, entity.name.tag.id | #56b6c2 | — |
| entity.other.attribute-name | #98c379 | — |
| support.constant | #56b6c2 | — |
| support.type, support.variable | #56b6c2 | — |
| support.other.variable | — | |
| invalid | #F8F8F0 | — |
| invalid.deprecated | #F8F8F0 | — |
| string.detected-link | #61afef | — |
| meta.diff, meta.diff.header | #75715E | — |
| markup.deleted | #e06c75 | — |
| markup.inserted | #98c379 | — |
| markup.changed | #e5c07b | — |
| constant.numeric.line-number.find-in-files - match | #56b6c2A0 | — |
| entity.name.filename.find-in-files | #e5c07b | — |
| markup.italic, markup.italic.markdown | — | italic |
| punctuation.definition.italic.markdown, punctuation.definition.bold.markdown, punctuation.definition.heading.markdown | #676f7d | — |
| punctuation.definition.italic.markdown | — | italic |
| markup.underline.link.markdown | #61afef | — |
| markup.bold.markdown | — | bold |
| markup.heading.markdown | #e06c75 | bold |
| markup.quote.markdown | #98c379 | — |
| meta.separator.markdown | #c678dd | bold |
| markup.raw.inline.markdown, markup.raw.block.markdown | #56b6c2 | — |
| punctuation.definition.list_item.markdown | #ffffff | bold |
| support.dictionary.json | #98C379 | — |
| string.quoted.double.json, string.quoted.single.json | #E5C07B | — |
| support.type.property-name.json | #98C379 | |
| constant.numeric.json | #fff | — |
| constant.language.json | #E06C75 | — |
| meta.directive.vue | #98C379 | |
| expression.embedded.vue | #E06C75 | italic |
| meta.import.js | — | |
| variable.other.readwrite.alias.js | #61AFEF | underline italic |
| string.quoted.single.js, string.quoted.double.js | — | |
| variable.other.readwrite.js | #61AFEF | underline |
| keyword.operator.expression.in.js | #BBBBBB | |
| variable.other.object.js | #61AFEF | |
| variable.other.object.property.js | #61AFEF | |
| variable.other.property.js | #a5cdee | |
| meta.object-literal.key.js | #98C379 | |
| entity.name.function.js | #98C379 | — |
| storage.type.class.js | #E06C75 | — |
| storage.type.function.js | #E06C75 | — |
| variable.parameter.js | #ffffffd7 | italic |
| variable.other.readwrite.js | #ffffffd7 | |
| storage.type.js | #E06C75 | |
| keyword.operator.assignment.js | — | — |
| constant.numeric.decimal.js | #fff | |
| entity.other.attribute-name.html | #fff | — |
| string.quoted.double.html, string.quoted.single.html | — | |
| support.type.property-name.css, support.type.property-name.scss, support.type.property-name.less, support.type.property-name.sass | #98C379 | |
| entity.other.attribute-name.pseudo-class.css, entity.other.attribute-name.pseudo-class.scss, entity.other.attribute-name.pseudo-class.less, entity.other.attribute-name.pseudo-class.sass, entity.other.attribute-name.pseudo-element.css, entity.other.attribute-name.pseudo-element.scss, entity.other.attribute-name.pseudo-element.less, entity.other.attribute-name.pseudo-element.sass | #E06C75 | underline |
| support.constant.css, support.constant.scss, support.constant.less, support.constant.sass | #98c379 | — |
| variable.css, variable.scss, variable.less, variable.sass, variable.other.css, variable.other.scss, variable.other.less, variable.other.sass | #61AFEF | — |
| variable.css.string, variable.scss.string, variable.less.string, variable.sass.string | #e5c07b | — |
| unit.css, unit.scss, unit.less, unit.sass, keyword.other.unit.px.css, keyword.other.unit.px.sass, keyword.other.unit.px.less, keyword.other.unit.px.scss, keyword.other.unit.percentage.css, keyword.other.unit.percentage.sass, keyword.other.unit.percentage.less, keyword.other.unit.percentage.scss, punctuation.definition.constant.css, punctuation.definition.constant.sass, punctuation.definition.constant.less, punctuation.definition.constant.scss | #61AFEF | bold |
| function.css, function.scss, function.less, function.sass, support.function.misc.scss, support.function.misc.css, support.function.misc.less, support.function.misc.sass, support.function.calc.css, support.function.calc.less, support.function.calc.sass, support.function.calc.scss, support.function.timing-function.css, support.function.timing-function.less, support.function.timing-function.sass, support.function.timing-function.scss, support.function.gradient.css, support.function.gradient.less, support.function.gradient.sass, support.function.gradient.scss | #61AFEF | — |
| constant.numeric.css, constant.numeric.scss, constant.numeric.sass, constant.numeric.less, support.constant.property-value.css, support.constant.property-value.scss, support.constant.property-value.sass, support.constant.property-value.less, constant.other.rgb-value.css, constant.other.rgb-value.scss, constant.other.rgb-value.sass, constant.other.rgb-value.less, constant.other.color.rgb-value.hex.css, constant.other.color.rgb-value.hex.scss, constant.other.color.rgb-value.hex.sass, constant.other.color.rgb-value.hex.less | #E5C07B | |
| entity.other.attribute-name.id.css, entity.other.attribute-name.id.sass, entity.other.attribute-name.id.less, entity.other.attribute-name.id.scss, entity.other.attribute-name.class.css, entity.other.attribute-name.class.sass, entity.other.attribute-name.class.less, entity.other.attribute-name.class.scss, entity.name.tag.css, entity.name.tag.sass, entity.name.tag.less, entity.name.tag.scss | #E06C75 | |
| keyword.operator.combinator.css, keyword.operator.combinator.scss, keyword.operator.combinator.sass, keyword.operator.combinator.less | #61AFEF |
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}!`;
}