liveBook · Manning

Type argument

A type argument is an argument supplied to a parameterized construct to specify a type or constrain the kinds of values it accepts.

How 5 Manning books explain it

Kotlin in Action, 2E

How it is used
Supplies concrete element, key, value, or result types when using Kotlin generic classes and functions.
How deep it goes
Defines syntax, inference, constraints, nullability, erasure, reification, and variance, with runnable collection and function examples.
Examples
Uses `List<String>`, `Map<String, Person>`, `slice<Char>`, constrained `max`, nullable `Processor`, and `filterIsInstance<String>`.
What you can do after
Apply it via Kotlin generic collections and functions, choosing explicit arguments, relying on inference, and respecting bounds and runtime erasure.

Read how Kotlin in Action, 2E explains type argument →

React in Depth

How it is used
Supplies intended types to generic TypeScript functions and React APIs when inference is inadequate.
How deep it goes
Works through inference, explicit unions, hook typing, and ref-argument order; flags generic-component wrappers without detailing their workaround.
Examples
Uses a middle-element function, nullable appointment state, an empty tag array, typed refs, and pagination over two item types.
What you can do after
Apply it via TypeScript and React to preserve intended types across generic functions, hooks, contexts, refs, and components.

Read how React in Depth explains type argument →

Essential TypeScript 5, Third Edition

A generic type argument supplies a concrete type for a parameterized type's placeholder.

How it is used
Uses type arguments to specialize collections, database schemas, and HTTP result types for compiler checking.
How deep it goes
Works through explicit constructor arguments, inferred constructor and method arguments, and their resulting types.
Examples
Shows a numbered-key Map, person and product collections, a generic property accessor, and an Angular HTTP request.
What you can do after
Apply it via TypeScript generics to specify checked collection types and expected library result types.

Read how Essential TypeScript 5, Third Edition explains type argument →

F# in Action: A Revised Edition of Get Programming with F#

A generic type argument is a concrete type supplied for a parameterized generic type or function.

How it is used
Uses type arguments to construct generic collections and describe or invoke reusable functions.
How deep it goes
Explains explicit arguments, type holes, inference, automatic generalization, and the error produced by incompatible argument types.
Examples
Demonstrates ResizeArray, combineElements, mixed-type errors, and List.map from int list to string list.
What you can do after
Apply it via F# syntax, choose explicit annotations when inference lacks context, and read generic function signatures.

Read how F# in Action: A Revised Edition of Get Programming with F# explains type argument →

100 Go Mistakes and How to Avoid Them

A type argument is a concrete type supplied for a generic type parameter.

How it is used
Uses concrete types to instantiate generic functions and types while retaining compile-time type safety.
How deep it goes
Explains instantiation, explicit calls, and constraint failures, but stops short of detailed type-inference rules.
Examples
Demonstrates generic map-key extraction, explicit string arguments, invalid slice keys, and custom type constraints.
What you can do after
Apply generics by supplying valid concrete types to generic functions and recognizing constraint violations.

Read how 100 Go Mistakes and How to Avoid Them explains type argument →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.