Readonly

The readonly modifier ensures that a property of an object cannot be reassigned.

Snippet:

type Point = { readonly x: number; readonly y: number };

Example:

const point: Point = { x: 10, y: 20 };