One Dark Night Theme
Publisher: sojibAhmedSafiThemes in package: 5
One Dark Night Theme optimized for comfortable long coding hours.Focused dark navy palette for reduced eye strain while coding.
One Dark Night Theme optimized for comfortable long coding hours.Focused dark navy palette for reduced eye strain while coding.
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 |
|---|---|---|
| meta.embedded, source.groovy.embedded, string meta.image.inline.markdown, variable.legacy.builtin.python | #D4D4D4 | — |
| emphasis | — | italic |
| strong | — | bold |
| header | #000080 | — |
| comment | #6A9955 | — |
| constant.language | #CCCCCC | — |
| constant.numeric, variable.other.enummember, keyword.operator.plus.exponent, keyword.operator.minus.exponent | #c64640 | — |
| constant.regexp | #646695 | — |
| entity.name.tag | #dfab5c | — |
| entity.name.tag.css, entity.name.tag.less | #D7BA7D | — |
| entity.other.attribute-name | #9CDCFE | — |
| entity.other.attribute-name.class.css, source.css entity.other.attribute-name.class, entity.other.attribute-name.id.css, entity.other.attribute-name.parent-selector.css, entity.other.attribute-name.parent.less, source.css entity.other.attribute-name.pseudo-class, entity.other.attribute-name.pseudo-element.css, source.css.less entity.other.attribute-name.id, entity.other.attribute-name.scss | #D7BA7D | — |
| invalid | #F44747 | — |
| markup.underline | — | underline |
| markup.bold | #CCCCCC | bold |
| markup.heading | #CCCCCC | bold |
| markup.italic | — | italic |
| markup.strikethrough | — | strikethrough |
| markup.inserted | #B5CEA8 | — |
| markup.deleted | #CE9178 | — |
| markup.changed | #CCCCCC | — |
| punctuation.definition.quote.begin.markdown | #6A9955 | — |
| punctuation.definition.list.begin.markdown | #6796E6 | — |
| markup.inline.raw | #CE9178 | — |
| punctuation.definition.tag | #CCCCCC | — |
| meta.preprocessor, entity.name.function.preprocessor | #CCCCCC | — |
| meta.preprocessor.string | #CE9178 | — |
| meta.preprocessor.numeric | #B5CEA8 | — |
| meta.structure.dictionary.key.python | #9CDCFE | — |
| meta.diff.header | #CCCCCC | — |
| storage | #CCCCCC | — |
| storage.type | #77b7d7 | — |
| storage.modifier, keyword.operator.noexcept | #CCCCCC | — |
| string, meta.embedded.assembly | #977cdc | — |
| string.tag | #CE9178 | — |
| string.value | #CE9178 | — |
| string.regexp | #D16969 | — |
| punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded | #CCCCCC | — |
| meta.template.expression | #D4D4D4 | — |
| support.type.vendored.property-name, support.type.property-name, source.css variable, source.coffee.embedded | #9CDCFE | — |
| keyword | #77b7d7 | — |
| keyword.control | #77b7d7 | — |
| keyword.operator | #D4D4D4 | — |
| keyword.operator.new, keyword.operator.expression, keyword.operator.cast, keyword.operator.sizeof, keyword.operator.alignof, keyword.operator.typeid, keyword.operator.alignas, keyword.operator.instanceof, keyword.operator.logical.python, keyword.operator.wordlike | #CCCCCC | — |
| keyword.other.unit | #B5CEA8 | — |
| punctuation.section.embedded.begin.php, punctuation.section.embedded.end.php | #CCCCCC | — |
| support.function.git-rebase | #9CDCFE | — |
| constant.sha.git-rebase | #B5CEA8 | — |
| storage.modifier.import.java, variable.language.wildcard.java, storage.modifier.package.java | #D4D4D4 | — |
| variable.language | #CCCCCC | — |
| entity.name.function, support.function, support.constant.handlebars, source.powershell variable.other.member, entity.name.operator.custom-literal | #86d9ca | — |
| support.class, support.type, entity.name.type, entity.name.namespace, entity.other.attribute, entity.name.scope-resolution, entity.name.class, storage.type.numeric.go, storage.type.byte.go, storage.type.boolean.go, storage.type.string.go, storage.type.uintptr.go, storage.type.error.go, storage.type.rune.go, storage.type.cs, storage.type.generic.cs, storage.type.modifier.cs, storage.type.variable.cs, storage.type.annotation.java, storage.type.generic.java, storage.type.java, storage.type.object.array.java, storage.type.primitive.array.java, storage.type.primitive.java, storage.type.token.java, storage.type.groovy, storage.type.annotation.groovy, storage.type.parameters.groovy, storage.type.generic.groovy, storage.type.object.array.groovy, storage.type.primitive.array.groovy, storage.type.primitive.groovy | #86d9ca | — |
| meta.type.cast.expr, meta.type.new.expr, support.constant.math, support.constant.dom, support.constant.json, entity.other.inherited-class | #4EC9B0 | — |
| keyword.control, source.cpp keyword.operator.new, keyword.operator.delete, keyword.other.using, keyword.other.directive.using, keyword.other.operator, entity.name.operator | #77b7d7 | — |
| variable, meta.definition.variable.name, support.variable, entity.name.variable, constant.other.placeholder | #CCCCCC | — |
| keyword.control.import.js, keyword.control.from.js, keyword.control.flow.js, keyword.control.conditional.js, keyword.control.loop.js, storage.type.function.js, variable.parameter.js, entity.other.attribute-name.js, storage.type.js, meta.var.expr.js, meta.embedded.expression.js, keyword.control.export.js, keyword.control.default.js, support.variable.property.js, constant.language.null.js | #77b7d7 | — |
| punctuation, variable.other.object.js, variable.other.readwrite.js, meta.brace, variable.other.constant.js, keyword.operator.arithmetic.js, keyword.operator.comparison.js, keyword.operator.assignment.js, keyword.operator.relational.js, keyword.operator.increment.js, keyword.operator.logical.js | #CCCCCC | — |
| variable.other.constant, variable.other.enummember | #CCCCCC | — |
| meta.object-literal.key | #9CDCFE | — |
| support.constant.property-value, support.constant.font-name, support.constant.media-type, support.constant.media, constant.other.color.rgb-value, constant.other.rgb-value, support.constant.color | #CE9178 | — |
| punctuation.definition.group.regexp, punctuation.definition.group.assertion.regexp, punctuation.definition.character-class.regexp, punctuation.character.set.begin.regexp, punctuation.character.set.end.regexp, keyword.operator.negation.regexp, support.other.parenthesis.regexp | #CE9178 | — |
| constant.character.character-class.regexp, constant.other.character-class.set.regexp, constant.other.character-class.regexp, constant.character.set.regexp | #D16969 | — |
| keyword.operator.or.regexp, keyword.control.anchor.regexp | #DCDCAA | — |
| keyword.operator.quantifier.regexp | #D7BA7D | — |
| constant.character, constant.other.option | #CCCCCC | — |
| constant.character.escape | #D7BA7D | — |
| entity.name.label | #C8C8C8 | — |
| ref.matchtext | #CCCCCC | — |
| token.info-token | #6796E6 | — |
| token.warn-token | #CD9731 | — |
| token.error-token | #F44747 | — |
| token.debug-token | #B267E6 | — |
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}!`;
}