import { Component , normalizeOptions } from '../runtime/component' ; import { warn } from '../warn' ; import type { ComponentOptions , Props } from '../types' ; param options returns export function defineComponent < T extends Readonly < Props > > ( options ) { const normalized = normalizeOptions ( options ) ; if ( ! normalized . tag . includes ( '-' ) ) { warn ( 'Component names should include a hyphen (-) or be Pascal/camelCased with at least 1-2 upper-case character' , options . name ) ; } const CustomComponent = class extends Component { static options = normalized ; } ; window . customElements . define ( CustomComponent . is , CustomComponent ) ; return CustomComponent ; }