Browse Source

fix(core): moved window types to index.d.ts

Alvaro 2 years ago
parent
commit
7f7601643f
2 changed files with 11 additions and 11 deletions
  1. 0 11
      packages/tres/src/env.d.ts
  2. 11 0
      packages/tres/src/types/index.d.ts

+ 0 - 11
packages/tres/src/env.d.ts

@@ -8,14 +8,3 @@ declare module '*.vue' {
 }
 
 declare module '*.glsl' {}
-
-declare global {
-  // Define the window interface, with type annotations for the properties and methods of the window object
-  interface Window {
-    // Define the location property, with a type of Location
-    __TRES__: {
-      app: App
-      version: string
-    }
-  }
-}

+ 11 - 0
packages/tres/src/types/index.d.ts

@@ -11,3 +11,14 @@ export type TresVNodeType = VNodeTypes & {
 }
 export type TresVNode = VNode & { children?: Array<VNode>; type: TresVNodeType }
 export type TresAttributes = Record<string, any> & { args?: number[] }
+
+declare global {
+  // Define the window interface, with type annotations for the properties and methods of the window object
+  interface Window {
+    // Define the location property, with a type of Location
+    __TRES__: {
+      app: App
+      version: string
+    }
+  }
+}