Browse Source

better typing

Raanan Weber 7 năm trước cách đây
mục cha
commit
260ae37cc8
2 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 1 1
      inspector/src/adapters/GUIAdapter.ts
  2. 3 1
      inspector/src/properties_gui.ts

+ 1 - 1
inspector/src/adapters/GUIAdapter.ts

@@ -10,7 +10,7 @@ export class GUIAdapter
     extends Adapter
     implements IToolVisible {
 
-    constructor(obj: any/*GUI.Control*/) {
+    constructor(obj: import("babylonjs-gui").Control) {
         super(obj);
     }
 

+ 3 - 1
inspector/src/properties_gui.ts

@@ -1,11 +1,13 @@
 
 import { PROPERTIES } from "./properties";
 
+export type GUITyping = typeof import("babylonjs-gui");
+
 export let guiLoaded: boolean = false;
 /**
   * Function that add gui objects properties to the variable PROPERTIES
   */
-export function loadGUIProperties(GUI: typeof import("babylonjs-gui")) {
+export function loadGUIProperties(GUI: GUITyping) {
 
     guiLoaded = !!GUI;