typings-resolver
v1.0.0
Published
Resolve all Typescript Definitions Files
Downloads
14
Readme
typings-resolver
A lib to recursively resolve all typings files of a package. Works both in browser and in node environment.
Install
npm i typings-resolver
Usage
await resolve done
import { Resolver } from "typings-resolver";
const resolver = new Resolver();
await resolver.addPackage({ name: "react" });
const files = resolver.getFiles();
console.log("files", files);
use EventEmitter
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" });