Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f26d7f2

Browse files
committedNov 8, 2024·
fix: build dts error TS7056
1 parent ad0c850 commit f26d7f2

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed
 

‎src/core/controls/CameraControls.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
Vector3,
1515
Vector4,
1616
} from 'three'
17-
import { computed, onUnmounted, ref, toRefs, watch, watchEffect } from 'vue'
17+
import { computed, onUnmounted, Ref, ref, toRefs, watch, watchEffect } from 'vue'
1818
import type { TresControl } from '@tresjs/core'
1919
import type {
2020
Camera,
@@ -402,7 +402,7 @@ const touches = computed(() => getTouches(
402402
props.touches,
403403
))
404404
405-
const controlsRef = ref<TresControl & CameraControls | null>(null)
405+
const controlsRef: Ref<TresControl & CameraControls | null> = ref(null)
406406
extend({ CameraControls })
407407
408408
watchEffect(() => {

‎src/core/controls/MapControls.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { useLoop, useTresContext } from '@tresjs/core'
33
import { useEventListener } from '@vueuse/core'
44
import { MapControls } from 'three-stdlib'
5-
import { onUnmounted, ref, toRefs, watch } from 'vue'
5+
import { onUnmounted, Ref, ref, toRefs, watch } from 'vue'
66
import type { TresVector3 } from '@tresjs/core'
77
import type { Camera } from 'three'
88
@@ -281,7 +281,7 @@ watch(props, () => {
281281
invalidate()
282282
})
283283
284-
const controlsRef = ref<MapControls | null>(null)
284+
const controlsRef: Ref<MapControls | null> = ref(null)
285285
286286
extend({ MapControls })
287287

‎src/core/controls/OrbitControls.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { useLoop, useTresContext } from '@tresjs/core'
33
import { useEventListener } from '@vueuse/core'
44
import { TOUCH } from 'three'
55
import { OrbitControls } from 'three-stdlib'
6-
import { onUnmounted, ref, toRefs, watch } from 'vue'
6+
import { onUnmounted, Ref, ref, toRefs, watch } from 'vue'
77
import type { TresVector3 } from '@tresjs/core'
88
import type { Camera } from 'three'
99
@@ -282,7 +282,7 @@ const {
282282
283283
const { camera: activeCamera, renderer, extend, controls, invalidate } = useTresContext()
284284
285-
const controlsRef = ref<OrbitControls | null>(null)
285+
const controlsRef: Ref<OrbitControls | null> = ref(null)
286286
287287
extend({ OrbitControls })
288288

0 commit comments

Comments
 (0)
Please sign in to comment.