Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Expose type definitions of the npm package #229

Open
0b5vr opened this issue Apr 21, 2022 · 1 comment
Open

Expose type definitions of the npm package #229

0b5vr opened this issue Apr 21, 2022 · 1 comment

Comments

@0b5vr
Copy link

0b5vr commented Apr 21, 2022

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;
  }
}
@sebavan
Copy link
Member

sebavan commented Apr 21, 2022

related to #218

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants