---
source: https://iinventedlight.com/library/notes/typescript-object-types.md
title: "TypeScript object types: inline, interface, or type alias"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "CC BY 4.0 (microsoft/TypeScript-Website); restated in our own words"
attribution: "Summary by iinventedlight (AI-assisted). Sources: Microsoft (TypeScript Handbook), TypeScript: Documentation - Object Types, CC BY 4.0 (microsoft/TypeScript-Website); TypeScript (Microsoft), Everyday Types, CC BY 4.0 (microsoft/TypeScript-Website)."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-04
status: published
checked_on: 2026-11-05
as_of: 2026-11-05
confidence: medium
untested: "No code was run; only the fetched documentation pages were read."
category: coding-references
topic_area: "typescript: describing object shapes"
tags: typescript, types, interfaces, objects
sources:
  - id: S1
    title: "TypeScript: Documentation - Object Types"
    publisher: Microsoft (TypeScript Handbook)
    url: https://www.typescriptlang.org/docs/handbook/2/objects.html
    accessed: 2026-11-05
    license: "CC BY 4.0 (microsoft/TypeScript-Website)"
  - id: S2
    title: "Everyday Types"
    publisher: TypeScript (Microsoft)
    url: https://www.typescriptlang.org/docs/handbook/2/everyday-types.html
    accessed: 2026-11-05
    license: "CC BY 4.0 (microsoft/TypeScript-Website)"
    license: "CC BY 4.0 (microsoft/TypeScript-Website)"
---
# TypeScript object types

## Short answer
Object types list named properties and their types. Properties may be optional or readonly. You can write them inline or as interfaces/type aliases. [S1][S2]

## Points
- Object types can be anonymous. [S1]
- Each property can mark optionality and writability. [S1]
- Everyday Types also shows how to list properties to define an object type. [S2]
- Optional properties are marked with `?`. [S2]

## Claims
- id: C1
  claim: Object types can be written anonymously.
  source: S1
  evidence: "As we've seen, they can be anonymous"
- id: C2
  claim: Property types may mark optionality and writability.
  source: S1
  evidence: "the type, whether the property is optional, and whether the property can be written to"
- id: C3
  claim: Define an object type by listing properties and types.
  source: S2
  evidence: "To define an object type, we simply list its properties and their types"
- id: C4
  claim: Object types can mark properties as optional.
  source: S2
  evidence: "some or all of their properties are optional"

## Sources
- [S1] TypeScript: Documentation - Object Types. Microsoft (TypeScript Handbook). https://www.typescriptlang.org/docs/handbook/2/objects.html . License: CC BY 4.0 (microsoft/TypeScript-Website). Accessed 2026-11-05.
- [S2] Everyday Types. TypeScript (Microsoft). https://www.typescriptlang.org/docs/handbook/2/everyday-types.html . License: CC BY 4.0 (microsoft/TypeScript-Website). Accessed 2026-11-05.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted).

Source notice: TypeScript Handbook / Website docs © Microsoft. Licensed under Creative Commons Attribution 4.0 International (https://github.com/microsoft/TypeScript-Website/blob/v2/LICENSE).
