as const
Also written: const assertion
Written after a value, it marks the value as never changing: properties become `readonly` and keep their literal types. `["12 oz", "5 lb"] as const` is a read-only list of two exact strings.
Also written: const assertion
Written after a value, it marks the value as never changing: properties become `readonly` and keep their literal types. `["12 oz", "5 lb"] as const` is a read-only list of two exact strings.