Naps Theme
Publisher: kimmojaeThemes in package: 2
A cozy, eye-friendly dark theme. So relaxing you might fall asleep.
A cozy, eye-friendly dark theme. So relaxing you might fall asleep.
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 | #6c7a80 | italic |
| string | #b5bd68 | — |
| constant.numeric | #de935f | — |
| constant.language | #de935f | — |
| constant.character, constant.other | #de935f | — |
| keyword, storage.modifier.async | #b294bb | — |
| storage | #c5c8c6 | — |
| meta.brace.round | #8abeb7 | — |
| keyword.operator | #8abeb7 | — |
| storage.type | #b294bb | — |
| storage.type.function | #8abeb7 | — |
| entity.name.class | #a6e22e | — |
| entity.other.inherited-class, entity.name.type.module | #81a2be | italic |
| entity.name.function | #81a2be | — |
| variable.parameter | #de935fbb | — |
| entity.name.tag | #de935f | — |
| entity.other.attribute-name | #81a2be | — |
| support.function | #81a2be | — |
| support.constant | — | |
| support.class | #de935f | — |
| support.variable.dom | #de935f | — |
| invalid | #f8f8f0 | |
| invalid.deprecated | #f8f8f0 | — |
| support.variable.object, support.variable.property | #de935f | — |
| meta.brace.square, punctuation.definition.block, punctuation.definition.template-expression, punctuation.definition.typeparameters, punctuation.definition.string.template, punctuation.section.embedded, punctuation.definition.binding-pattern | #f0c674 | — |
| storage.modifier, storage.type.class.js | #f0c674 | — |
| variable.language.this.js | #6c7a80 | italic |
| variable.language.super.js | #f0c674 | — |
| punctuation.definition.parameters | #b5bd68 | — |
| meta.type.annotation, meta.return.type, meta.type.parameters | #cc6666 | — |
| string.template variable.other, string.template punctuation.accessor | #c5c8c6bb | — |
| string.regexp punctuation.definition | #f0c674 | — |
| string.regexp meta.group, string.regexp keyword.other.back-reference | #c5c8c6bb | — |
| string.regexp meta.assertion, string.regexp keyword.operator | #de935f | — |
| string.regexp constant.other | #81a2be | — |
| string.regexp constant.character | #99dbff | — |
| string.regexp keyword.control.anchor | #cc6666 | — |
| source.properties | #de935f | — |
| entity.name.section.group-title.properties | #81a2be | — |
| punctuation.separator.key-value, punctuation.separator.dictionary.key-value | #8abeb7 | — |
| entity.name.tag.yaml | #81a2be | — |
| meta.attribute-selector, punctuation.section.property-list | #f0c674 | — |
| punctuation.separator.operator | #8abeb7 | — |
| punctuation.terminator.rule, punctuation.terminator.statement | #8abeb7 | — |
| meta.selector | #8abeb7 | — |
| keyword.other.unit | #de935f | — |
| meta.property-value | #6c7a80 | — |
| keyword.other.important | #cc6666 | — |
| meta.at-rule.media | #c5c8c6 | — |
| support.type.property-name.media | — | |
| meta.tag.sgml.html | #cc6666 | — |
| meta.tag.inline.any.html, meta.tag.structure.any.html, meta.tag.block.any.html, meta.tag.any.html | #8abeb7 | — |
| punctuation.definition.tag.html, punctuation.definition.tag.begin, punctuation.definition.tag.end, punctuation.definition.tag.xml | #6c7a80 | — |
| entity.name.section.markdown | #b294bb | — |
| punctuation.definition.heading.markdown | #f0c674 | — |
| punctuation.definition.heading.markdown, beginning.punctuation.definition.quote.markdown, punctuation.definition.markdown, punctuation.definition.italic.markdown, punctuation.definition.bold.markdown, beginning.punctuation.definition.list.markdown, punctuation.definition.raw.markdown | #6c7a80 | — |
| punctuation.definition.constant.markdown, punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.metadata.markdown, punctuation.definition.constant.begin.markdown, punctuation.definition.constant.end.markdown | #f0c674 | |
| fenced_code.block.language | #cc6666 | — |
| markup.italic.markdown | #c5c8c6 | italic |
| markup.bold.markdown | #c5c8c6 | bold |
| meta.link.inline.markdown, markup.underline.link.markdown | #81a2be | |
| markup.quote.markdown | #b5bd6888 | |
| markup.list.unnumbered.markdown | #b5bd68dd | |
| markup.list.numbered.markdown | #b5bd68aa | |
| constant.other.reference.link.markdown | #cc6666 | |
| meta.tag.preprocessor.xml, meta.tag.xml | #8abeb7 | — |
| punctuation.definition.dictionary | #f0c674 | — |
| punctuation.support.type.property-name, punctuation.definition.string | #6c7a80 | — |
| support.type.property-name.json | #81a2be | — |
| punctuation.separator.dictionary.pair.json, punctuation.separator.parameter.js, punctuation.separator.comma.js | #8abeb7 | — |
| punctuation.definition.array.begin.json, punctuation.definition.array.end.json | #cc6666 | — |
| source.graphql meta.variables, source.graphql meta.arguments | #c5c8c6bb | — |
| source.graphql variable.arguments | #de935fbb | — |
| source.graphql constant | #de935f | — |
| source.graphql variable.fragment, source.graphql entity.name.fragment | #99dbff | — |
| source.graphql entity.name.function.directive | #b5bd68aa | — |
| source.graphql support.type | #cc6666 | — |
| source.graphql punctuation.operation, source.graphql meta.brace.round | #f0c674 | — |
| source.graphql keyword.operator | #f0c674 | — |
| source.graphql punctuation.colon, source.graphql punctuation.comma | #8abeb7 | — |
| source.reason entity.name.class | #de935f | — |
| source.reason entity.name.tag.inline.any | #de935fbb | — |
| source.reason markup.inserted constant.language | #c5c8c6bb | — |
| source.reason support.type string.regexp | #cc6666 | — |
| source.reason keyword.control | #8abeb7 | — |
| source.reason constant.numeric | #99dbff | — |
| meta.interpolation.cs variable.other.object.cs, meta.interpolation.cs variable.other.object.property.cs, meta.interpolation.cs variable.other.readwrite.cs | #c5c8c6 | — |
| token.info-token | #81a2be | — |
| token.warn-token | #de935f | — |
| token.error-token | #a54242 | — |
| token.debug-token | #85678f | — |
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}!`;
}