SgtCoder Developer Coding Theme
Publisher: SgtCoderThemes in package: 2
The perfect coding theme.
The perfect coding 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 |
|---|---|---|
| string, constant.other.character-class.range.regexp, constant.other.character-class.set.regexp, keyword.operator.quantifier.regexp, punctuation.definition.template-expression, variable.interpolation.scss, support.constant.property-value, support.constant.color | #A8601A | — |
| variable, meta.template.expression, constant.language.pseudo, punctuation.separator.key-value, storage.modifier.import, new.expr entity.name.type.module, constant.other.php, support.variable | #212121 | — |
| constant.language, constant.numeric, constant.other.color, variable.language | #C0392B | — |
| keyword, storage, entity.name.tag.reference, punctuation.separator.key-value, support.type.python | #9C00B0 | — |
| entity.name.tag, entity.name.function, support.function, support.class.builtin, entity.name.type.class, new.expr entity.name.type, storage.type.java, punctuation.definition.tag, meta.function-call.generic | #1565C0 | — |
| entity.other.attribute-name, meta.object-literal.key, variable.object.property, support.type.property-name.json, entity.name.tag.css, entity.name.tag.custom, variable.parameter.function-call | #2E7D32 | — |
| comment, storage.type.class.jsdoc, variable.other.jsdoc, comment.block.documentation.phpdoc, string.quoted.docstring.multi | #9E9E9E | italic |
| meta.type.annotation, meta.return.type, keyword.operator.type.annotation, meta.type.parameters, storage.type.annotation | #78909C | — |
| markup.heading | #C0392B | bold |
| markup.raw, markup.inline.raw | #A8601A | — |
| markup.italic | — | italic |
| markup.bold, punctuation.section.embedded.begin.php, punctuation.section.embedded.end.php | — | bold |
TypeScript sample highlighted with this variant's colors and tokenColors.
Loading...
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}!`;
}
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}!`;
}