Stats.Panel() should allow for 3 optional arguments: name, fg and bg strings. However, the corresponding typescript declaration file doesn't allow for any arguments.
Would you mind opening a PR? None of the maintainers of this repository use TypeScript, so if those who are can test and contribute fixes that helps us with these reports.
I tested three.js in typescript in a few days ago, the terminal got an error.
import Stats from 'three/examples/jsm/libs/stats.module.js';
const stats = new Stats();
~~~~~~~~~~
document.body.appendChild( stats.dom );
terminal error information:
[tsl] ERROR in C:\threejs-project\src\index.ts(3,15)
TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type.
@donmccurdy I'll work on it right now.
@linbingquan That error means you have to do it without the new keyword. Just const stats = Stats(); This is the only Three.js object I've come across that doesn't have a constructor like the others. It's just a function.
Most helpful comment
Would you mind opening a PR? None of the maintainers of this repository use TypeScript, so if those who are can test and contribute fixes that helps us with these reports.