A lib to recursively resolve all typings files of a package. Works both in browser and in node environment.
npm i typings-resolver
import { Resolver } from "typings-resolver";
const resolver = new Resolver();
await resolver.addPackage({ name: "react" });
const files = resolver.getFiles();
console.log("files", files);
import { Resolver } from "typings-resolver";
const resolver = new Resolver();
resolver.emitter.on("add", console.log);
resolver.emitter.on("done", () => {
const files = resolver.getFiles();
console.log("files", files);
});
resolver.addPackage({ name: "react" });