Tagged: TypeScript
15 articles tagged TypeScript across all clusters on CodeWalkers.
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.
Union Types and Narrowing in TypeScript
Union types, literal types, and the narrowing toolkit: typeof, in, instanceof, discriminated unions, and exhaustiveness checking with never.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.