Pages

Topics

Tools

↑↓navigate↵openescclose

All syntax guides

Short, practical guides on programming syntax, language fundamentals, and the tools developers reach for every day.

3,965 guides across 14 topics

Topics

Latest guides

3D illustration of a transformer pipeline converting object keys into prefixed getter methods with glowing neon gears
TypeScript

TypeScript Mapped Types: Syntax, Key Remapping with as, and Modifiers

How mapped types iterate over keys, add and remove readonly and optional modifiers, and use the as clause to rename keys or drop properties entirely with never.

TypeScriptGenericsUtility Types
3D illustration contrasting a hazardous red open any conduit with a secure blue unknown chamber guarded by verification gates
TypeScript

TypeScript unknown vs any: Type Safety, Type Guards, and Best Practices

Why any contaminates every caller while unknown forces the check at the boundary, with validation functions, generic inference traps, and the few places any is honestly correct.

TypeScriptType SafetyBest Practices
3D illustration of JavaScript object key tags being scanned into a type-safe union key ring labelled with property names
TypeScript

TypeScript keyof and typeof: Object Type Queries and Property Keys

The difference between the two type queries, why keyof typeof collapses to string without literal types, and how K extends keyof T keeps a key and its value type in correspondence.

TypeScriptType SystemGenerics
3D illustration of a nested generic promise capsule being scanned by a glowing infer sensor that extracts the resolved inner type
TypeScript

TypeScript infer Keyword: Conditional Types, ReturnType, and Unwrapping

How infer binds a type inside a conditional type, why distribution over unions changes results, and how ReturnType, Parameters, and recursive unwrapping types are actually built.

TypeScriptGenericsAdvanced
3D illustration of mutable TypeScript variable boxes locking into frozen crystalline readonly type blocks with glowing padlocks
TypeScript

TypeScript as const: Const Assertions, Readonly Tuples, and Literal Types

What as const actually changes in inference, why object properties widen without it, and how readonly tuples, derived unions, and satisfies combine in real config and route tables.

TypeScriptType SystemWeb Development
Go struct blocks contrasted with pointer addresses and value copies
Go

Go Structs and Pointers: Value vs Pointer Receivers, Embedding, and Memory

Value and pointer receivers, shallow copies, addressability, embedding, and struct layout: the rules that decide when a method mutates, when a copy diverges, and why field order changes size.

GoData StructuresBackend
Layered error capsules scanned to reveal a sentinel error core inside
Go

Go Error Handling: errors.Is, errors.As, Sentinel Errors, and Custom Types

errors.Is and errors.As explained through the wrapping that makes them necessary: %w chains, multiple wrapped errors, custom Is methods, and the pointer rules that make As panic.

GoError HandlingBackend
An abstract interface socket accepting matching struct blocks with teal accents
Go

Go Interfaces: Implicit Implementation, Type Assertions, and Type Switches

Implicit interface satisfaction in Go: method sets and receiver kinds, type assertions versus type switches, the typed-nil interface, and the compile errors that name the missing method.

GoInterfacesBackend
A glowing ring wrapping a method module and routing metadata conduits
TypeScript

TypeScript Decorators: Stage 3 Syntax, Method Decorators, and Metadata

The standard decorator pipeline since TypeScript 5.0: the value and context signature for methods, fields, and accessors, addInitializer ordering, Symbol.metadata, and where it diverges from experimentalDecorators.

TypeScriptDecoratorsArchitecture
Glowing letter blocks assembling into a type-safe string pattern with neon brackets
TypeScript

TypeScript Template Literal Types: Syntax, String Manipulation, and Patterns

Template literal types as patterns over string types: union cross products, the four intrinsic case types, key remapping with as, infer-based splitting, and the depth limit that ends recursive types.

TypeScriptType SystemAdvanced