This bit me when using useState<Options[]> as a react hook, when I mistyped {...options} instead of [...options], I only found out when I tried to access .map of "array" (object) and got a TypeError. Let me give you an example that can clarify my question:
interface Option {
title: string;
isSelected?: boolean;
}
function myFunc(options: Option[]): void {}
const options: Option[] = [{title: 'Male', isSelected: true}, {title: 'Female'}, {title: 'Other'}];
const options2 = {...options};
myFunc(options);
myFunc(options2); // why isn't this an error ?