如何检查对象是否具有给定的键,属性及其类型?
const requiredKeys = {title: 'string', type: ['image', 'video', 'website'], src: 'string'};
const optionalKeys = {description: 'string', views: 'number', ranking: 'number'};
const internalKeys = {id: 'number', timestamp: 'number'};