Browse Source

fix: fake a `VNodeRef` on types to accept strings and null (#344)

* fix: fake a `VNodeRef` on types to accept strings and null

* chore: remove unused VNodeRef import
Alvaro Saburido 1 year ago
parent
commit
c069f6423d
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/types/index.ts

+ 4 - 4
src/types/index.ts

@@ -144,7 +144,7 @@ type EventProps<P> = P extends RaycastableRepresentation ? Partial<EventHandlers
 
 export interface VueProps<P> {
   children?: VNode[]
-  ref?: Ref<P>
+  ref?: string | null | Ref<P>
   key?: string
 }
 
@@ -159,8 +159,8 @@ export type ThreeElement<T extends ConstructorRepresentation> = Mutable<
 type ThreeExports = typeof THREE
 type ThreeInstancesImpl = {
   [K in keyof ThreeExports as Uncapitalize<K>]: ThreeExports[K] extends ConstructorRepresentation
-    ? ThreeElement<ThreeExports[K]>
-    : never
+  ? ThreeElement<ThreeExports[K]>
+  : never
 }
 
 export interface ThreeInstances extends ThreeInstancesImpl {
@@ -172,5 +172,5 @@ type TresComponents = {
 }
 
 declare module 'vue' {
-  export interface GlobalComponents extends TresComponents {}
+  export interface GlobalComponents extends TresComponents { }
 }