Pārlūkot izejas kodu

tsconfig inheritance

sebavan 6 gadi atpakaļ
vecāks
revīzija
bb311b39ad

+ 6 - 3
gui/src/2D/advancedDynamicTexture.ts

@@ -724,19 +724,22 @@ export class AdvancedDynamicTexture extends DynamicTexture {
     }
     }
 
 
     /** @hidden */
     /** @hidden */
-    private onClipboardCopy = (evt: ClipboardEvent) => {
+    private onClipboardCopy = (rawEvent: Event) => {
+        const evt = rawEvent as ClipboardEvent;
         let ev = new ClipboardInfo(ClipboardEventTypes.COPY, evt);
         let ev = new ClipboardInfo(ClipboardEventTypes.COPY, evt);
         this.onClipboardObservable.notifyObservers(ev);
         this.onClipboardObservable.notifyObservers(ev);
         evt.preventDefault();
         evt.preventDefault();
     }
     }
     /** @hidden */
     /** @hidden */
-    private onClipboardCut = (evt: ClipboardEvent) => {
+    private onClipboardCut = (rawEvent: Event) => {
+        const evt = rawEvent as ClipboardEvent;
         let ev = new ClipboardInfo(ClipboardEventTypes.CUT, evt);
         let ev = new ClipboardInfo(ClipboardEventTypes.CUT, evt);
         this.onClipboardObservable.notifyObservers(ev);
         this.onClipboardObservable.notifyObservers(ev);
         evt.preventDefault();
         evt.preventDefault();
     }
     }
     /** @hidden */
     /** @hidden */
-    private onClipboardPaste = (evt: ClipboardEvent) => {
+    private onClipboardPaste = (rawEvent: Event) => {
+        const evt = rawEvent as ClipboardEvent;
         let ev = new ClipboardInfo(ClipboardEventTypes.PASTE, evt);
         let ev = new ClipboardInfo(ClipboardEventTypes.PASTE, evt);
         this.onClipboardObservable.notifyObservers(ev);
         this.onClipboardObservable.notifyObservers(ev);
         evt.preventDefault();
         evt.preventDefault();

+ 1 - 20
gui/tsconfig.json

@@ -1,25 +1,6 @@
 {
 {
+    "extends": "../tsconfigRules",
     "compilerOptions": {
     "compilerOptions": {
-        "experimentalDecorators": true,
-        "module": "commonjs",
-        "target": "es5",
-        "moduleResolution": "node",
-        "noImplicitAny": true,
-        "noImplicitReturns": true,
-        "noImplicitThis": true,
-        "noUnusedLocals": true,
-        "strictNullChecks": true,
-        "declaration": true,
-        "sourceMap": true,
-        "lib": [
-            "es5",
-            "dom",
-            "es2015.promise",
-            "es2015.collection",
-            "es2015.iterable"
-        ],
-        "skipDefaultLibCheck": true,
-        "skipLibCheck": true,
         "baseUrl": "./src/",
         "baseUrl": "./src/",
         "rootDir": "./src/",
         "rootDir": "./src/",
         "paths": {
         "paths": {

+ 2 - 1
inspector/src/inspector.ts

@@ -288,7 +288,8 @@ export class Inspector {
 
 
     public static EarlyAttachToLoader() {
     public static EarlyAttachToLoader() {
         if (!this._GlobalState.onPluginActivatedObserver) {
         if (!this._GlobalState.onPluginActivatedObserver) {
-            this._GlobalState.onPluginActivatedObserver = SceneLoader.OnPluginActivatedObservable.add((loader: GLTFFileLoader) => {
+            this._GlobalState.onPluginActivatedObserver = SceneLoader.OnPluginActivatedObservable.add((rawLoader) => {
+                const loader = rawLoader as GLTFFileLoader;
                 if (loader.name === "gltf") {
                 if (loader.name === "gltf") {
                     this._GlobalState.prepareGLTFPlugin(loader);
                     this._GlobalState.prepareGLTFPlugin(loader);
                 }
                 }

+ 1 - 20
inspector/tsconfig.json

@@ -1,26 +1,7 @@
 {
 {
+    "extends": "../tsconfigRules",
     "compilerOptions": {
     "compilerOptions": {
-        "experimentalDecorators": true,
-        "module": "esnext",
-        "target": "es5",
         "jsx": "react",
         "jsx": "react",
-        "noImplicitAny": true,
-        "noImplicitReturns": true,
-        "noImplicitThis": true,
-        "noUnusedLocals": true,
-        "strictNullChecks": true,
-        "moduleResolution": "node",
-        "declaration": true,
-        "sourceMap": true,
-        "lib": [
-            "es5",
-            "dom",
-            "es2015.promise",
-            "es2015.collection",
-            "es2015.iterable"
-        ],
-        "skipDefaultLibCheck": true,
-        "skipLibCheck": true,
         "baseUrl": "./src/",
         "baseUrl": "./src/",
         "rootDir": "./src/",
         "rootDir": "./src/",
         "paths": {
         "paths": {

+ 4 - 2
loaders/src/glTF/2.0/glTFLoader.ts

@@ -1220,7 +1220,8 @@ import { IGLTFLoader, GLTFFileLoader, GLTFLoaderState, IGLTFLoaderData, GLTFLoad
                             outTangent: key.outTangent ? key.outTangent[targetIndex] : undefined
                             outTangent: key.outTangent ? key.outTangent[targetIndex] : undefined
                         })));
                         })));
 
 
-                        this._forEachPrimitive(targetNode, (babylonMesh: Mesh) => {
+                        this._forEachPrimitive(targetNode, (babylonAbstractMesh: AbstractMesh) => {
+                            const babylonMesh = babylonAbstractMesh as Mesh;
                             const morphTarget = babylonMesh.morphTargetManager!.getTarget(targetIndex);
                             const morphTarget = babylonMesh.morphTargetManager!.getTarget(targetIndex);
                             const babylonAnimationClone = babylonAnimation.clone();
                             const babylonAnimationClone = babylonAnimation.clone();
                             morphTarget.animations.push(babylonAnimationClone);
                             morphTarget.animations.push(babylonAnimationClone);
@@ -1359,7 +1360,8 @@ import { IGLTFLoader, GLTFFileLoader, GLTFLoaderState, IGLTFLoaderData, GLTFLoad
 
 
             if (accessor.sparse) {
             if (accessor.sparse) {
                 const sparse = accessor.sparse;
                 const sparse = accessor.sparse;
-                accessor._data = accessor._data.then((data: Float32Array) => {
+                accessor._data = accessor._data.then((view: ArrayBufferView) => {
+                    const data = view as Float32Array;
                     const indicesBufferView = ArrayItem.Get(`${context}/sparse/indices/bufferView`, this.gltf.bufferViews, sparse.indices.bufferView);
                     const indicesBufferView = ArrayItem.Get(`${context}/sparse/indices/bufferView`, this.gltf.bufferViews, sparse.indices.bufferView);
                     const valuesBufferView = ArrayItem.Get(`${context}/sparse/values/bufferView`, this.gltf.bufferViews, sparse.values.bufferView);
                     const valuesBufferView = ArrayItem.Get(`${context}/sparse/values/bufferView`, this.gltf.bufferViews, sparse.values.bufferView);
                     return Promise.all([
                     return Promise.all([

+ 1 - 20
loaders/tsconfig.json

@@ -1,25 +1,6 @@
 {
 {
+  "extends": "../tsconfigRules",
   "compilerOptions": {
   "compilerOptions": {
-      "experimentalDecorators": true,
-      "module": "commonjs",
-      "target": "es5",
-      "moduleResolution": "node",
-      "noImplicitAny": true,
-      "noImplicitReturns": true,
-      "noImplicitThis": true,
-      "noUnusedLocals": true,
-      "strictNullChecks": true,
-      "declaration": true,
-      "sourceMap": true,
-      "lib": [
-          "es5",
-          "dom",
-          "es2015.promise",
-          "es2015.collection",
-          "es2015.iterable"
-      ],
-      "skipDefaultLibCheck": true,
-      "skipLibCheck": true,
       "baseUrl": "./src/",
       "baseUrl": "./src/",
       "rootDir": "./src/",
       "rootDir": "./src/",
       "paths": {
       "paths": {

+ 1 - 20
materialsLibrary/tsconfig.json

@@ -1,25 +1,6 @@
 {
 {
+    "extends": "../tsconfigRules",
     "compilerOptions": {
     "compilerOptions": {
-        "experimentalDecorators": true,
-        "module": "commonjs",
-        "target": "es5",
-        "moduleResolution": "node",
-        "noImplicitAny": true,
-        "noImplicitReturns": true,
-        "noImplicitThis": true,
-        "noUnusedLocals": true,
-        "strictNullChecks": true,
-        "declaration": true,
-        "sourceMap": true,
-        "lib": [
-            "es5",
-            "dom",
-            "es2015.promise",
-            "es2015.collection",
-            "es2015.iterable"
-        ],
-        "skipDefaultLibCheck": true,
-        "skipLibCheck": true,
         "baseUrl": "./src/",
         "baseUrl": "./src/",
         "rootDir": "./src/",
         "rootDir": "./src/",
         "paths": {
         "paths": {

+ 1 - 20
postProcessLibrary/tsconfig.json

@@ -1,25 +1,6 @@
 {
 {
+    "extends": "../tsconfigRules",
     "compilerOptions": {
     "compilerOptions": {
-        "experimentalDecorators": true,
-        "module": "commonjs",
-        "target": "es5",
-        "moduleResolution": "node",
-        "noImplicitAny": true,
-        "noImplicitReturns": true,
-        "noImplicitThis": true,
-        "noUnusedLocals": true,
-        "strictNullChecks": true,
-        "declaration": true,
-        "sourceMap": true,
-        "lib": [
-            "es5",
-            "dom",
-            "es2015.promise",
-            "es2015.collection",
-            "es2015.iterable"
-        ],
-        "skipDefaultLibCheck": true,
-        "skipLibCheck": true,
         "baseUrl": "./src/",
         "baseUrl": "./src/",
         "rootDir": "./src/",
         "rootDir": "./src/",
         "paths": {
         "paths": {

+ 1 - 20
proceduralTexturesLibrary/tsconfig.json

@@ -1,25 +1,6 @@
 {
 {
+    "extends": "../tsconfigRules",
     "compilerOptions": {
     "compilerOptions": {
-        "experimentalDecorators": true,
-        "module": "commonjs",
-        "target": "es5",
-        "moduleResolution": "node",
-        "noImplicitAny": true,
-        "noImplicitReturns": true,
-        "noImplicitThis": true,
-        "noUnusedLocals": true,
-        "strictNullChecks": true,
-        "declaration": true,
-        "sourceMap": true,
-        "lib": [
-            "es5",
-            "dom",
-            "es2015.promise",
-            "es2015.collection",
-            "es2015.iterable"
-        ],
-        "skipDefaultLibCheck": true,
-        "skipLibCheck": true,
         "baseUrl": "./src/",
         "baseUrl": "./src/",
         "rootDir": "./src/",
         "rootDir": "./src/",
         "paths": {
         "paths": {

+ 1 - 13
serializers/tsconfig.json

@@ -1,16 +1,6 @@
 {
 {
+  "extends": "../tsconfigRules",
   "compilerOptions": {
   "compilerOptions": {
-      "experimentalDecorators": true,
-      "module": "commonjs",
-      "target": "es5",
-      "moduleResolution": "node",
-      "noImplicitAny": true,
-      "noImplicitReturns": true,
-      "noImplicitThis": true,
-      "noUnusedLocals": true,
-      "strictNullChecks": true,
-      "declaration": true,
-      "sourceMap": true,
       "lib": [
       "lib": [
           "es5",
           "es5",
           "dom",
           "dom",
@@ -18,8 +8,6 @@
           "es2015.collection",
           "es2015.collection",
           "es2015.iterable"
           "es2015.iterable"
       ],
       ],
-      "skipDefaultLibCheck": true,
-      "skipLibCheck": true,
       "baseUrl": "./src/",
       "baseUrl": "./src/",
       "rootDir": "./src/",
       "rootDir": "./src/",
       "paths": {
       "paths": {

+ 1 - 21
src/tsconfig.json

@@ -1,27 +1,7 @@
 {
 {
+  "extends": "../tsconfigRules",
   "compilerOptions": {
   "compilerOptions": {
-      "experimentalDecorators": true,
-      "module": "commonjs",
-      "target": "es5",
-      "moduleResolution": "node",
-      "noImplicitAny": true,
-      "noImplicitReturns": true,
-      "noImplicitThis": true,
-      "noUnusedLocals": true,
-      "strictNullChecks": true,
-      "strictFunctionTypes": true,
-      "declaration": true,
-      "sourceMap": true,
-      "lib": [
-          "es5",
-          "dom",
-          "es2015.promise",
-          "es2015.collection",
-          "es2015.iterable"
-      ],
       "types" : [],
       "types" : [],
-      "skipDefaultLibCheck": true,
-      "skipLibCheck": true,
       "baseUrl": "./",
       "baseUrl": "./",
       "rootDir": "./",
       "rootDir": "./",
       "outDir": "./build"
       "outDir": "./build"

+ 24 - 0
tsconfigRules.json

@@ -0,0 +1,24 @@
+{
+    "compilerOptions": {
+        "moduleResolution": "node",
+        "module": "commonjs",
+        "target": "es5",
+        "declaration": true,
+        "sourceMap": true,
+        "experimentalDecorators": true,
+        "noImplicitAny": true,
+        "noImplicitReturns": true,
+        "noImplicitThis": true,
+        "noUnusedLocals": true,
+        "strictNullChecks": true,
+        "strictFunctionTypes": true,
+        "skipLibCheck": true,
+        "lib": [
+            "es5",
+            "dom",
+            "es2015.promise",
+            "es2015.collection",
+            "es2015.iterable"
+        ]
+    }
+}