Skip to content

Commit

Permalink
fix(proxy): export ProxyComponent interface
Browse files Browse the repository at this point in the history
  • Loading branch information
hirsch88 committed Jan 17, 2022
1 parent 5257ef4 commit 6d7d085
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/components-angular/src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ export const parseCustomEvent = <T>(event: CustomEvent<T> | Event): T => {
throw Error('Event was not a Custom Event or did not had a detail prop!')
}

interface WebComponent<T> {
export interface ProxyComponent<T> {
el: T
}

// eslint-disable-next-line
export const element = <T>(elementReference: any): T => {
const component: WebComponent<T> = elementReference
const component: ProxyComponent<T> = elementReference
return component.el
}
6 changes: 3 additions & 3 deletions packages/components-vue/src/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { Ref, unref } from 'vue'

/**
* WebComponent Helpers
* ProxyComponent Helpers
*/

interface WebComponent<T> {
export interface ProxyComponent<T> {
$el: T
}

// eslint-disable-next-line
export const element = <T>(elementReference: Ref<any> | any): T => {
const component: WebComponent<T> = unref(elementReference)
const component: ProxyComponent<T> = unref(elementReference)
return component.$el
}

0 comments on commit 6d7d085

Please sign in to comment.