import { isPlainObject } from 'lodash-es'; import { type Component } from 'vue'; // Vue produces a different type of object in dev and prod mode, so we cannot check for e.g `typeof val.render === 'function` export const isComponent = (val: unknown): val is Component => isPlainObject(val);