Spector.js icon indicating copy to clipboard operation
Spector.js copied to clipboard

Expose type definitions of the npm package

Open 0b5vr opened this issue 2 years ago • 1 comments

Description

I have tried to use spectorjs from Safari in my TypeScript project, so I installed the spectorjs package from npm. However, the type definition of the package is not exposed. I think there is no risk to expose the type definition.

Workaround

Having spectorjs.d.ts with the content below will make the example work:

declare module 'spectorjs' {
  class Spector {
    constructor();
    public displayUI(): void;
  }
}

0b5vr avatar Apr 21 '22 03:04 0b5vr

related to https://github.com/BabylonJS/Spector.js/pull/218

I guess we could manually add a typing file for the time being to support both UMD definitions ?

sebavan avatar Apr 21 '22 14:04 sebavan