浏览代码

better typing

Raanan Weber 7 年之前
父节点
当前提交
260ae37cc8
共有 2 个文件被更改,包括 4 次插入2 次删除
  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;