Error when implement this pakage in angular app
Shahbaz5523 opened this issue · comments
Error: node_modules/js-3d-model-viewer/src/index.d.ts:7:25 - error TS7010: 'clearScene', which lacks return-type annotation, implicitly has an 'any' return type.
7 export declare function clearScene(scene: Scene) ;
~~~~~~~~~~
Error: node_modules/js-3d-model-viewer/src/index.d.ts:8:25 - error TS7010: 'resetCamera', which lacks return-type annotation, implicitly has an 'any' return type.
8 export declare function resetCamera(scene: Scene);
~~~~~~~~~~~
Error: node_modules/js-3d-model-viewer/src/index.d.ts:9:25 - error TS7010: 'showGrid', which lacks return-type annotation, implicitly has an 'any' return type.
9 export declare function showGrid(scene: Scene);
~~~~~~~~
Error: node_modules/js-3d-model-viewer/src/index.d.ts:10:25 - error TS7010: 'hideGrid', which lacks return-type annotation, implicitly has an 'any' return type.
10 export declare function hideGrid(scene: Scene);
~~~~~~~~
Error: node_modules/js-3d-model-viewer/src/index.d.ts:12:25 - error TS7010: 'enableCache', which lacks return-type annotation, implicitly has an 'any' return type.
12 export declare function enableCache() ;
~~~~~~~~~~~
Error: node_modules/js-3d-model-viewer/src/index.d.ts:13:25 - error TS7010: 'disableCache', which lacks return-type annotation, implicitly has an 'any' return type.
13 export declare function disableCache() ;
~~~~~~~~~~~~
-------Solution----
node_modules/js-3d-model-viewer/src/index.d.ts
please export function with :void; type please update it
export declare function clearScene(scene: Scene): void;
export declare function resetCamera(scene: Scene): void;
export declare function showGrid(scene: Scene): void;
export declare function hideGrid(scene: Scene): void;
export declare function enableCache(): void;
export declare function disableCache(): void;
Thank you for reporting. I will check what soon. By the meantime, you can open a pull request to make it faster!