Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

421 B
Raw Blame
import type { ExtractPropTypes, ExtractDefaultPropTypes } from "vue"

/**
 * Correctly extracts optional prop types.
 *
 * I think this is fixed in the Vue 3 types but hasn't been
 * ported back to `@vue/composition-api` so for now we have
 * to suffer this ugly type.
 */
export type ProperlyExtractPropTypes<P> = Omit<
  ExtractPropTypes<P>,
  keyof ExtractDefaultPropTypes<P>
> &
  Partial<ExtractDefaultPropTypes<P>>