source: frontend/node_modules/pkg-up/index.d.ts

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 914 bytes
Line 
1declare namespace pkgUp {
2 interface Options {
3 /**
4 Directory to start from.
5
6 @default process.cwd()
7 */
8 readonly cwd?: string;
9 }
10}
11
12declare const pkgUp: {
13 /**
14 Find the closest `package.json` file.
15
16 @returns The filepath, or `null` if it couldn't be found.
17
18 @example
19 ```
20 // /
21 // └── Users
22 // └── sindresorhus
23 // └── foo
24 // ├── package.json
25 // └── bar
26 // ├── baz
27 // └── example.js
28
29 // example.js
30 import pkgUp = require('pkg-up');
31
32 (async () => {
33 console.log(await pkgUp());
34 //=> '/Users/sindresorhus/foo/package.json'
35 })();
36 ```
37 */
38 (options?: pkgUp.Options): Promise<string | null>;
39
40 /**
41 Synchronously find the closest `package.json` file.
42
43 @returns The filepath, or `null` if it couldn't be found.
44 */
45 sync(options?: pkgUp.Options): string | null;
46};
47
48export = pkgUp;
Note: See TracBrowser for help on using the repository browser.