Tagged: TypeScript

15 articles tagged TypeScript across all clusters on CodeWalkers.

Programming Beginner

unknown, any, and Runtime Data in TypeScript

Why unknown beats any at the boundaries of a TypeScript app, how to validate runtime data such as parsed JSON, and what type assertions actually cost.

By Caliph Herald
Programming Beginner

Union Types and Narrowing in TypeScript

Union types, literal types, and the narrowing toolkit: typeof, in, instanceof, discriminated unions, and exhaustiveness checking with never.

By Caliph Herald
Programming Beginner

Interfaces and Type Aliases in TypeScript

Interfaces and type aliases both name shapes in TypeScript. Learn the real differences: extension, declaration merging, what each form can express, and which to default to.

By Caliph Herald
Programming Beginner

The First Types to Learn in TypeScript

Primitive annotations, arrays, object types, and type inference in TypeScript: what to annotate, what to let the compiler infer, and why const and let behave differently.

By Caliph Herald
Programming Beginner

TypeScript Types

The TypeScript type system from the ground up: the first annotations, interfaces and type aliases, union types and narrowing, and handling unknown runtime data.

By Caliph Herald
Programming Beginner

API Contracts and Shared Models in TypeScript

Modelling a request and response once, why a shared type is not validation, generating types from an OpenAPI or GraphQL schema, and changing a contract without breaking callers.

By Caliph Herald
Programming Beginner

TypeScript with React: Props, Children, State, and Events

JSX settings, component prop types, children and native element props, typed state and refs, event handlers, and what types cannot enforce across the server and client boundary.

By Caliph Herald
Programming Beginner

TypeScript Tooling and Project Workflow

The compiler commands worth knowing, why transpiling is not type checking, what the editor language service does, wiring a real check into CI, and migrating a JavaScript codebase.

By Caliph Herald
Programming Beginner

tsconfig.json Explained

What tsconfig.json controls, which files actually get checked, what strict mode turns on, the flags that stay off until you name them, and how to share a config across a workspace.

By Caliph Herald
Programming Beginner

TypeScript Tooling

The half of TypeScript that is not types: tsconfig.json, the split between transpiling and type checking, React components, and API contracts between a frontend and its server.

By Caliph Herald
Programming Beginner

TypeScript Utility Types: Pick, Omit, Partial, and Record

Pick, Omit, Partial, Required, Record, Readonly, ReturnType, and Awaited: what each one really does, where the checking is looser than it looks, and when to name the result.

By Caliph Herald
Programming Beginner

Generic Functions and Types in TypeScript

Type parameters explained without the theory: what a generic buys you, how inference fills it in at the call site, constraints with extends, generic types, and defaults.

By Caliph Herald
Programming Beginner

Typing Functions and Callbacks in TypeScript

Parameter and return annotations, optional and rest parameters, named function types, and the contextual typing that removes most callback annotations.

By Caliph Herald
Programming Beginner

TypeScript Generics and Function Types

Reusable types in TypeScript: function and callback types, type parameters with constraints and defaults, and the built-in utility types that derive one shape from another.

By Caliph Herald
Programming Beginner

JavaScript vs TypeScript: Which Should You Learn?

JavaScript and TypeScript are the same language with one big difference: types. Here is what TypeScript actually adds, when the extra step pays off, and which one a beginner should start with.

By Caliph Herald