Skip to content

Commit

Permalink
fix(types-(fix-#427)): vueprops change ref to vnoderef and key add nu…
Browse files Browse the repository at this point in the history
…mber and symbol (#428)

Updated `ref` in VueProps to use `VNodeRef` type from vue, to support using a function ref. Also updated key to accept numbers and symbols

#427 #427

Co-authored-by: Patrick Byrn <[email protected]>
  • Loading branch information
PatrickByrn and Patrick Byrn authored Oct 30, 2023
1 parent ffaadeb commit 45aeafd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/ban-types */
import type { DefineComponent, Ref, VNode } from 'vue'
import type { DefineComponent, VNode, VNodeRef } from 'vue'

import type * as THREE from 'three'
import type { EventProps as PointerEventHandlerEventProps } from '../composables/usePointerEventHandler'
Expand Down Expand Up @@ -160,8 +160,8 @@ type EventProps<P> = P extends RaycastableRepresentation ? Partial<EventHandlers

export interface VueProps<P> {
children?: VNode[]
ref?: string | null | Ref<P>
key?: string
ref?: VNodeRef
key?: string | number | symbol
}

type ElementProps<T extends ConstructorRepresentation, P = InstanceType<T>> = Partial<
Expand Down

0 comments on commit 45aeafd

Please sign in to comment.