mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
12 lines
248 B
TypeScript
12 lines
248 B
TypeScript
import pkgDir = require('pkg-dir');
|
|
|
|
pkgDir('/Users/project/pkg-dir').then(rootDir => {
|
|
rootDir; // $ExpectType string | null
|
|
});
|
|
|
|
pkgDir().then(rootDir => {
|
|
rootDir;
|
|
});
|
|
|
|
pkgDir.sync('/Users/project/pkg-dir'); // $ExpectType string | null
|