square / find-yarn-workspace-root

Algorithm for finding the root of a yarn workspace, extracted from yarnpkg.com
Apache License 2.0
49 stars 8 forks source link

TypeScript declaration #12

Closed gfmio closed 6 years ago

gfmio commented 6 years ago

Hi!

Thanks for this useful package. I'm using it with TypeScript, but there are no declarations for it yet. Can I add them?

The only required steps are to add the declaration file index.d.ts and add the types field to the package.json ({ "types": "index.d.ts" }. The declaration file should contain:

declare function findWorkspaceRoot(initial?: string | null | undefined): string | null;
export = findWorkspaceRoot;

Can I submit a pull request?

Thanks!

eventualbuddha commented 6 years ago

I think that’d be great. Thanks!

gfmio commented 6 years ago

Just added a PR with the declaration file (#13).

gfmio commented 6 years ago

Closed by #13 and in package version 1.2.1.