( options: any, extraOptions?: ComponentOptions, /** * @internal */ _createApp?: CreateAppFunction<Element>, )
| 166 | |
| 167 | /*@__NO_SIDE_EFFECTS__*/ |
| 168 | export function defineCustomElement( |
| 169 | options: any, |
| 170 | extraOptions?: ComponentOptions, |
| 171 | /** |
| 172 | * @internal |
| 173 | */ |
| 174 | _createApp?: CreateAppFunction<Element>, |
| 175 | ): VueElementConstructor { |
| 176 | let Comp = defineComponent(options, extraOptions) as any |
| 177 | if (isPlainObject(Comp)) Comp = extend({}, Comp, extraOptions) |
| 178 | class VueCustomElement extends VueElement { |
| 179 | static def = Comp |
| 180 | constructor(initialProps?: Record<string, any>) { |
| 181 | super(Comp, initialProps, _createApp) |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | return VueCustomElement |
| 186 | } |
| 187 | |
| 188 | /*@__NO_SIDE_EFFECTS__*/ |
| 189 | export const defineSSRCustomElement = (( |
no test coverage detected