One Dark Theme Improved
Publisher: huygnThemes in package: 1
One Dark Theme Improved based on Atom
One Dark Theme Improved based on Atom
Full workbench mockup using this variant's colors and tokenColors.
Loading...
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #abb2bf | — |
| comment, punctuation.definition.comment | #5c6370 | italic |
| comment | #5c6370 | italic |
| none | #A6B2C0 | — |
| keyword.operator | #c678dd | — |
| keyword | #c678dd | — |
| variable | #e06c75 | — |
| token.variable.parameter.java | #abb2bf | — |
| import.storage.java | #e5c07b | — |
| token.package.keyword | #c678dd | — |
| token.package | #abb2bf | — |
| entity.name.function, meta.require, support.function.any-method | #61afef | — |
| entity.name.type.namespace | #e5c07b | — |
| support.class, entity.name.type.class | #e5c07b | — |
| entity.name.class.identifier.namespace.type | #e5c07b | — |
| entity.name.class | #61afef | — |
| entity.name.type | #e5c07b | — |
| keyword.control | #c678dd | — |
| control.elements, keyword.operator.less | #d19a66 | — |
| keyword.other.special-method | #61afef | — |
| storage | #c678dd | — |
| token.storage.js, token.storage.ts | #c678dd | — |
| token.storage.type.java | #e5c07b | — |
| support.function | #56b6c2 | — |
| support.type.property-name | #abb2bf | — |
| support.constant.property-value | #abb2bf | — |
| support.constant.font-name | #d19a66 | — |
| meta.tag | #abb2bf | — |
| string, entity.other.inherited-class | #98c379 | — |
| constant.other.symbol | #56b6c2 | — |
| constant.numeric | #d19a66 | — |
| none | #d19a66 | — |
| none | #d19a66 | — |
| constant | #d19a66 | — |
| punctuation.definition.constant | #d19a66 | — |
| entity.name.tag | #e06c75 | — |
| entity.other.attribute-name | #d19a66 | — |
| entity.other.attribute-name.id | #61afef | — |
| punctuation.definition.entity | #d19a66 | — |
| meta.selector | #c678dd | — |
| none | #D2945D | — |
| markup.heading | #e06c75 | |
| markup.heading punctuation.definition.heading, entity.name.section | #61afef | — |
| keyword.other.unit | #d19a66 | — |
| markup.bold | #d19a66 | — |
| punctuation.definition.bold | #e5c07b | — |
| markup.italic, punctuation.definition.italic | #c678dd | — |
| emphasis md | #c678dd | — |
| strong md | #d19a66 | — |
| variable md | #98c379 | — |
| keyword md | #e06c75 | — |
| markup.raw.inline | #90C378 | — |
| string.other.link, punctuation.definition.string.end.markdown | #DF6A73 | — |
| meta.link | #D2945D | — |
| markup.list | #DF6A73 | — |
| markup.quote | #D2945D | — |
| meta.separator | #A6B2C0 | — |
| markup.inserted | #90C378 | — |
| markup.deleted | #DF6A73 | — |
| markup.changed | #C679DD | — |
| string.regexp | #57B6C2 | — |
| constant.character.escape | #57B6C2 | — |
| punctuation.section.embedded, variable.interpolation | #BE4F44 | — |
| invalid.illegal | #FFFFFF | — |
| invalid.broken | #FFFFFF | — |
| invalid.deprecated | #FFFFFF | — |
| invalid.unimplemented | #FFFFFF | — |
| source.json meta.structure.dictionary.json string.quoted.double.json | #DF6A73 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json | #90C378 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json string.quoted.double.json | #DF6A73 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json | #90C378 | — |
| text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade | #C679DD | — |
| text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade | #C679DD | — |
| meta.function.decorator.python | #61afef | — |
| support.token.decorator.python, meta.function.decorator.identifier.python | #56B6C2 | — |
| function.parameter | #d19a66 | — |
| function.parameter.js, function.parameter.ts | #abb2bf | — |
| function.brace | #abb2bf | — |
| function.parameter.ruby, function.parameter.cs | #abb2bf | — |
| rgb-value | #56B6C2 | — |
| inline-color-decoration rgb-value | #d19a66 | — |
| less rgb-value | #d19a66 | — |
| selector.sass | #e06c75 | — |
| var.this.js, var.this.ts | #DF6A73 | — |
| block.scope.end, block.scope.begin | #abb2bf | — |
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}!`;
}