Why does using the any
type disable strict null checks in the below code? Is this a bug?
type SomeType = any;
interface Optional {
some?: {
key: SomeType;
};
}
interface NotOptional {
key: SomeType;
}
const opt: Optional = {};
const val: NotOptional = {
key: opt.some?.key // no error if SomeType is any
}