Skip to content

Commit

Permalink
fix: fake a VNodeRef on types to accept strings and null (#344)
Browse files Browse the repository at this point in the history
* fix: fake a `VNodeRef` on types to accept strings and null

* chore: remove unused VNodeRef import
  • Loading branch information
alvarosabu authored Jul 11, 2023
1 parent f613018 commit c069f64
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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 {
Expand All @@ -172,5 +172,5 @@ type TresComponents = {
}

declare module 'vue' {
export interface GlobalComponents extends TresComponents {}
export interface GlobalComponents extends TresComponents { }
}

0 comments on commit c069f64

Please sign in to comment.