= { [K in keyof P]-?: P[K] extends Function ? never : K }[keyof P] + +export type NonFunctionKeys
= { [K in keyof P]-?: P[K] extends (...args: any[]) => any ? never : K }[keyof P] export type Overwrite
= Omit
> & O
export type Properties = { [K in keyof P]: P[K] | Readonly }
@@ -38,6 +38,7 @@ export interface InstanceProps : P[K] }
+export type WithMathProps = { [K in keyof P]: P[K] extends MathRepresentation | THREE.Euler ? MathType : P[K] }
interface RaycastableRepresentation {
raycast: (raycaster: THREE.Raycaster, intersects: THREE.Intersection[]) => void
@@ -208,7 +209,7 @@ export interface VueProps {
key?: string | number | symbol
}
-type ElementProps & VueProps & EventProps >
>
diff --git a/src/utils/createPriorityEventHook.test.ts b/src/utils/createPriorityEventHook.test.ts
index 79444594d..d7be2d2f4 100644
--- a/src/utils/createPriorityEventHook.test.ts
+++ b/src/utils/createPriorityEventHook.test.ts
@@ -1,4 +1,3 @@
-/* eslint-disable unicorn/consistent-function-scoping */
import { createPriorityEventHook } from './createPriorityEventHook'
let updateHook = createPriorityEventHook()
diff --git a/src/utils/index.ts b/src/utils/index.ts
index 5ab5bdbe3..f4be2bad1 100644
--- a/src/utils/index.ts
+++ b/src/utils/index.ts
@@ -1,10 +1,10 @@
-import type { Material, Mesh, Object3D, Texture } from 'three'
import { DoubleSide, MathUtils, MeshBasicMaterial, Scene, Vector3 } from 'three'
-import type { AttachType, LocalState, TresInstance, TresObject, TresPrimitive } from 'src/types'
import type { nodeOps } from 'src/core/nodeOps'
+import type { AttachType, LocalState, TresInstance, TresObject, TresPrimitive } from 'src/types'
+import type { Material, Mesh, Object3D, Texture } from 'three'
import { HightlightMesh } from '../devtools/highlight'
-import type { TresContext } from '../composables/useTresContextProvider'
import * as is from './is'
+import type { TresContext } from '../composables/useTresContextProvider'
export function toSetMethodName(key: string) {
return `set${key[0].toUpperCase()}${key.slice(1)}`
diff --git a/src/utils/is.ts b/src/utils/is.ts
index 639377767..4e7af96ea 100644
--- a/src/utils/is.ts
+++ b/src/utils/is.ts
@@ -21,8 +21,7 @@ export function bool(u: unknown): u is boolean {
return u === true || u === false
}
-// eslint-disable-next-line ts/no-unsafe-function-type
-export function fun(u: unknown): u is Function {
+export function fun(u: unknown): u is (...args: any[]) => any {
return typeof u === 'function'
}
diff --git a/src/utils/normalize.ts b/src/utils/normalize.ts
index b97925e11..f6229304e 100644
--- a/src/utils/normalize.ts
+++ b/src/utils/normalize.ts
@@ -1,5 +1,5 @@
-import type { ColorRepresentation } from 'three'
import { Color, Vector3 } from 'three'
+import type { ColorRepresentation } from 'three'
export type SizeFlexibleParams =
| number[]
diff --git a/src/utils/test-utils.ts b/src/utils/test-utils.ts
index 89f80306e..dcad8aee5 100644
--- a/src/utils/test-utils.ts
+++ b/src/utils/test-utils.ts
@@ -1,5 +1,5 @@
-import type { Fn } from '@vueuse/core'
import { createApp } from 'vue'
+import type { Fn } from '@vueuse/core'
export function withSetup(composable: Fn) {
let result
diff --git a/vite.config.ts b/vite.config.ts
index 30215b2e8..07481e332 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,20 +1,20 @@
///