settings is typed Readonly<Settings>, and the code type-checks under strict. What does it log?
type Settings = { theme: string; tags: string[] };
const settings: Readonly<Settings> = { theme: "dark", tags: ["news"] };
settings.tags.push("sport");
const copy: Settings = { ...settings, theme: "light" };
copy.tags.push("music");
console.log(settings.theme);
console.log(settings.tags.length);
console.log(copy.tags === settings.tags);
console.log(Object.isFrozen(settings));