Dark Cipher
Publisher: MattazThemes in package: 1
A Dark Theme for VS Code
A Dark Theme for VS Code
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 | #75715E | italic |
| string | #CAFF4D | — |
| punctuation.definition.template-expression, punctuation.section.embedded.coffee | #F92672 | — |
| meta.template.expression | #F8F8F2 | — |
| constant.numeric | #AE81FF | — |
| constant.language | #AE81FF | — |
| constant.character, constant.other | #AE81FF | — |
| variable | #D3D3D3 | |
| keyword | #F92672 | — |
| storage | #F92672 | |
| storage.type | #66D9EF | italic |
| entity.name.type, entity.name.class | #A6E22E | underline |
| variable.other, variable.js, punctuation.separator.variable | #0761E8 | |
| entity.other.inherited-class | #A6E22E | italic underline |
| entity.name.function | #90C920 | |
| variable.parameter | #FD971F | |
| entity.name.tag | #F92672 | |
| entity.other.attribute-name | #70C1B4 | italic |
| support.function | #66D9EF | italic |
| entity.other.attribute-name.id.css | #32cd32 | italic |
| entity.other.attribute-name.class.css | #00ff00 | italic |
| support.constant.property-value.css | #ffffff | |
| support.constant | #66D9EF | |
| support.type, support.class | #66D9EF | |
| support.other.variable | — | |
| invalid | #F8F8F0 | |
| invalid.deprecated | #F8F8F0 | — |
| meta.structure.dictionary.json string.quoted.double.json | #CFCFC2 | — |
| meta.diff, meta.diff.header | #75715E | — |
| markup.deleted | #F92672 | — |
| markup.inserted | #A6E22E | — |
| markup.changed | #E6DB74 | — |
| constant.numeric.line-number.find-in-files - match | #AE81FFA0 | — |
| entity.name.filename.find-in-files | #E6DB74 | — |
| markup.quote | #F92672 | — |
| markup.list | #E6DB74 | — |
| markup.bold, markup.italic | #66D9EF | — |
| markup.inline.raw | #FD971F | |
| markup.heading | #A6E22E | — |
| markup.heading.setext | #A6E22E | |
| token.info-token | #6796e6 | — |
| token.warn-token | #cd9731 | — |
| token.error-token | #f44747 | — |
| token.debug-token | #b267e6 | — |
| variable.language | #FD971F | — |
| modifier, this, comment, storage.modifier.js, entity.other.attribute-name.js, entity.other.attribute-name.html | — | italic |
| comment, emphasis, entity.name.method.js, entity.name.class.js, entity.name.tag.doctype, entity.other.attribute-name, entity.other.attribute-name.tag.jade, entity.other.attribute-name.tag.pug, keyword.control, keyword.operator.comparison, keyword.control.flow.js, keyword.control.flow.ts, keyword.control.flow.tsx, keyword.control.ruby, keyword.control.module.ruby, keyword.control.class.ruby, keyword.control.def.ruby, keyword.control.loop.js, keyword.control.loop.ts, keyword.control.import.js, keyword.control.import.ts, keyword.control.import.tsx, keyword.control.from.js, keyword.control.from.ts, keyword.control.from.tsx, keyword.operator.expression.delete, keyword.operator.new, keyword.operator.expression, keyword.operator.cast, keyword.operator.relational, keyword.operator.sizeof, keyword.operator.logical.python, italic, markup.italic, markup.quote, markup.changed, markup.italic.markdown, markup.quote.markdown, markup.deleted.diff, markup.inserted.diff, meta.delimiter.period, meta.diff.header.git, meta.diff.header.from-file, meta.diff.header.to-file, meta.tag.sgml.doctype, meta.class meta.method.declaration meta.var.expr storage.type.js, meta.decorator punctuation.decorator, meta.selector, punctuation.accessor, punctuation.definition.comment, punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded, quote, source.js constant.other.object.key.js string.unquoted.label.js, source.go keyword.package.go, source.go keyword.import.go, source.go keyword.function.go, source.go keyword.type.go, source.go keyword.struct.go, source.go keyword.interface.go, source.go keyword.const.go, source.go keyword.var.go, source.go keyword.map.go, source.go keyword.channel.go, source.go keyword.control.go, storage, storage.type, storage.modifier, storage.type.property.js, storage.type.property.ts, storage.type.property.tsx, tag.decorator.js entity.name.tag.js, tag.decorator.js, text.html.basic entity.other.attribute-name.html, text.html.basic entity.other.attribute-name, variable.language, variable.other.object.property | — | 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}!`;
}