farminf / pannellum-react

React Component for Pannellum (open source panorama viewer for the web)
MIT License
112 stars 81 forks source link

Typescript support #89

Open teddybee opened 2 years ago

teddybee commented 2 years ago

It would be great to have type definition package for this lib.

farminf commented 2 years ago

I try my best but I can't promise... I'll be active after couple of years on this repo and try to upgrade some packages and also move to functional react and hooks

kayvaninvemo commented 2 years ago

for the moment I used the augmentation as this

declare module "pannellum-react" {
  function Pannellum(props: any): JSX.Element;
}
kayvaninvemo commented 2 years ago

I also created a repo to support TypeScript, I can create PR if you like it

farminf commented 2 years ago

yes sir, please :)

kayvaninvemo commented 2 years ago

Here I created the PR

arcticfly commented 1 year ago

@farminf How would you feel about releasing a new npm version with this change?