0

I just need to implement instascan with typescript, but i cant find any information on internet about its types. I tried to declare and export "fake" modules, but i cant handle it works

/index.d.ts

declare module "Instascan" {
    export class Camera {
        //..
    }
}

/main.ts

import {Camera} from "Instascan";

// .. //
Axtlan
  • 103
  • 2
  • 6
  • Does this answer your question? [How to consume npm modules from typescript?](https://stackoverflow.com/questions/38224232/how-to-consume-npm-modules-from-typescript) – Lauren Yim Jul 12 '21 at 02:07
  • No, is more about to create just types for an already existent library – Axtlan Jul 13 '21 at 22:43
  • [This answer](https://stackoverflow.com/a/53786892/8289918) on that question explains how to use your own typings. – Lauren Yim Jul 14 '21 at 02:00

0 Answers0