1 Star 0 Fork 0

animalcoder/Vue

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
index.d.ts 1.40 KB
一键复制 编辑 原始数据 按行查看 历史
animalcoder 提交于 2020-03-23 09:59 +08:00 . Vue6
import * as typeFest from 'type-fest';
import normalize = require('normalize-package-data');
declare namespace readPkg {
interface Options {
/**
[Normalize](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) the package data.
@default true
*/
readonly normalize?: boolean;
/**
Current working directory.
@default process.cwd()
*/
readonly cwd?: string;
}
interface NormalizeOptions extends Options {
readonly normalize?: true;
}
type NormalizedPackageJson = PackageJson & normalize.Package;
type PackageJson = typeFest.PackageJson;
}
declare const readPkg: {
/**
@returns The parsed JSON.
@example
```
import readPkg = require('read-pkg');
(async () => {
console.log(await readPkg());
//=> {name: 'read-pkg', …}
console.log(await readPkg({cwd: 'some-other-directory'});
//=> {name: 'unicorn', …}
})();
```
*/
(options?: readPkg.NormalizeOptions): Promise<readPkg.NormalizedPackageJson>;
(options: readPkg.Options): Promise<readPkg.PackageJson>;
/**
@returns The parsed JSON.
@example
```
import readPkg = require('read-pkg');
console.log(readPkg.sync());
//=> {name: 'read-pkg', …}
console.log(readPkg.sync({cwd: 'some-other-directory'});
//=> {name: 'unicorn', …}
```
*/
sync(options?: readPkg.NormalizeOptions): readPkg.NormalizedPackageJson;
sync(options: readPkg.Options): readPkg.PackageJson;
};
export = readPkg;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/animalcoder/Vue.git
git@gitee.com:animalcoder/Vue.git
animalcoder
Vue
Vue
master

搜索帮助