UNPKG

916 BTypeScriptView Raw
1/// <reference types="read-pkg" />
2import { Package } from 'read-pkg';
3export interface PJSON extends Package {
4 name: string;
5 version: string;
6 anycli: {
7 schema?: number;
8 bin?: string;
9 npmRegistry?: string;
10 pluginScope?: string;
11 dirname?: string;
12 commands?: string;
13 hooks?: {
14 [name: string]: string[];
15 };
16 plugins?: PJSON.Plugin[];
17 devPlugins?: PJSON.Plugin[];
18 title?: string;
19 description?: string;
20 topics?: {
21 [k: string]: {
22 description?: string;
23 subtopics?: PJSON['anycli']['topics'];
24 hidden?: boolean;
25 };
26 };
27 };
28}
29export declare namespace PJSON {
30 type Plugin = string | {
31 type: 'user';
32 name: string;
33 tag?: string;
34 } | {
35 type: 'link';
36 root: string;
37 };
38}