Browse Source

fix: type for useloader component props

alvarosabu 7 months ago
parent
commit
a4bd590776
2 changed files with 7 additions and 6 deletions
  1. 2 2
      src/composables/useLoader/component.vue
  2. 5 4
      vite.config.ts

+ 2 - 2
src/composables/useLoader/component.vue

@@ -1,10 +1,10 @@
 <script setup lang="ts">
 <script setup lang="ts">
-import type { Loader } from 'three'
+import type { LoaderProto } from './index'
 import { reactive } from 'vue'
 import { reactive } from 'vue'
 import { useLoader } from './index'
 import { useLoader } from './index'
 
 
 const props = defineProps<{
 const props = defineProps<{
-  loader: Loader
+  loader: LoaderProto<unknown>
   url: string | string[]
   url: string | string[]
 }>()
 }>()
 
 

+ 5 - 4
vite.config.ts

@@ -9,12 +9,13 @@ import dts from 'vite-plugin-dts'
 
 
 import Inspect from 'vite-plugin-inspect'
 import Inspect from 'vite-plugin-inspect'
 
 
-/* import analyze from 'rollup-plugin-analyzer'
- */ /* import { visualizer } from 'rollup-plugin-visualizer' */
-import { bold, gray, lightGreen, yellow } from 'kolorist'
+/* import analyze from 'rollup-plugin-analyzer' */
 
 
+import { bold, gray, lightGreen, yellow } from 'kolorist'
 import { resolve } from 'pathe'
 import { resolve } from 'pathe'
 
 
+/* ß */
+
 import pkg from './package.json'
 import pkg from './package.json'
 
 
 // eslint-disable-next-line no-console
 // eslint-disable-next-line no-console
@@ -64,7 +65,7 @@ export default defineConfig({
           targets: [{ src: 'src/types/tres-components.d.ts', dest: 'dist/types' }],
           targets: [{ src: 'src/types/tres-components.d.ts', dest: 'dist/types' }],
         }),
         }),
         /*   analyze(), */
         /*   analyze(), */
-        /*    visualizer({
+        /* visualizer({
           open: true,
           open: true,
           gzipSize: true,
           gzipSize: true,
           brotliSize: true,
           brotliSize: true,