Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 775 Bytes

README.md

File metadata and controls

40 lines (28 loc) · 775 Bytes

typings-resolver


A lib to recursively resolve all typings files of a package. Works both in browser and in node environment.

demo

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" });