Browse Source

Fix a bit of typings

sebavan 6 years ago
parent
commit
c450b086e0

+ 3 - 0
Tools/Config/config.json

@@ -494,11 +494,14 @@
                 "webpackRoot": "INSPECTOR",
                 "processDeclaration": {
                     "filename": "babylon.inspector.module.d.ts",
+                    "moduleName": "INSPECTOR",
                     "importsToRemove": [],
                     "classMap": {
                         "babylonjs": "BABYLON",
                         "babylonjs-loaders": "BABYLON",
                         "babylonjs-serializers": "BABYLON",
+                        "babylonjs-gltf2interface": "BABYLON.GLTF2",
+                        "react": "React",
                         "babylonjs-gui": "BABYLON.GUI",
                         "@babylonjs/core": "BABYLON",
                         "@babylonjs/loaders": "BABYLON",

+ 1 - 1
Tools/Gulp/helpers/gulp-processModuleDeclarationToNamespace.js

@@ -135,7 +135,7 @@ var processData = function(data, packageName, options) {
     if ((options.classMap)) {
         // Replace import { foo, bar } from ...
         Object.keys(options.classMap).forEach(package => {
-            var babylonRegex = new RegExp(`import {(.*)} from ['"](${package})['"];`, "g");
+            var babylonRegex = new RegExp(`import {(.*)} from ['"](${package})[\/'"](.*);`, "g");
 
             var match = babylonRegex.exec(str);
             let classes = new Set();

+ 1 - 0
inspector/src/components/globalState.ts

@@ -1,4 +1,5 @@
 import { GLTFFileLoader, IGLTFLoaderExtension } from "babylonjs-loaders/glTF/index";
+import { IGLTFValidationResults } from "babylonjs-gltf2interface";
 
 import { Nullable } from "babylonjs/types";
 import { Observable, Observer } from "babylonjs/Misc/observable";