Optional type property
An optional type property is an object or schema property that may be omitted from a value without violating its declared requirements.
The Design of Web APIs, Second Edition
An optional property is an object property that need not be present in an instance because its name is absent from the applicable required list.
- How it is used
- Defines whether API consumers may omit object properties or whether an API may omit them from responses.
- How deep it goes
- Explains required lists, nested object schemas, and backward-compatible input changes, but does not detail validation implementation.
- Examples
- Uses Product fields, a nested supplier object, and an optional transfer reason object to demonstrate omission and conditional requirements.
- What you can do after
- Configure JSON Schema required lists and assess whether API input or output changes remain compatible.
Read how The Design of Web APIs, Second Edition explains optional type property →
Essential TypeScript 5, Third Edition
An optional property is an object property that a TypeScript interface or shape type permits to be absent.
- How it is used
- Accommodates irregular object collections and interface implementations where some properties or methods are not shared by every object.
- How deep it goes
- Explains declaration syntax, shape matching, undefined results, and conditional method checks, but does not descend into compiler internals.
- Examples
- Uses product objects with an optional waterproof flag and Person implementations with an optional dog name and method.
- What you can do after
- Apply it in TypeScript shapes and interfaces while checking optional values and methods before use.
Read how Essential TypeScript 5, Third Edition explains optional type property →
Related concepts
- union typeequivalent to · A union type is a type whose values can be any one of several specified alternative types or variants.
- shape typeuses · A shape type specifies an object type through a particular combination of property names and value types.
- schemapart of · A data schema is a formal specification of the structure, fields, types, relationships, and constraints of data.
- backward compatibilityused by · Backward compatibility is the property of a changed or newer system remaining usable by existing clients and consumers of its earlier interfaces, behavior, or data.
- interfacepart of · A software interface is a contract or boundary that specifies the operations, properties, or capabilities through which types or components interact, without requiring a particular implementation.
- componentused by · A software component is a modular part of a larger system that provides related functionality and interacts with other parts through defined boundaries or interfaces.
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.

