-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathindex.d.ts
40 lines (33 loc) · 1.07 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
declare function DistTagErrorback(error: Error, prefix?: never, distTags?: never): void;
declare function DistTagErrorback(error: null, prefix: string, distTags: Record<string, salita.Version>): void;
declare function lookupDistTags(name: string, callback: typeof DistTagErrorback): void;
declare namespace salita {
export type DepKey =
| 'dependencies'
| 'devDependencies'
| 'peerDependencies'
| 'bundledDependencies'
| 'optionalDependencies';
export type Version = `${'v' | ''}${number}.${number}.${number}`;
export type Options = {
'dry-run'?: boolean;
'json'?: boolean;
'ignore-pegged'?: boolean;
'ignore-stars'?: boolean;
'only-changed'?: boolean;
};
export type CB = (counts: Promise<[number, number][]>) => void;
export type LookupDistTags = typeof lookupDistTags;
export type Result = {
after: string;
before: string;
error?: Error;
isChanged: boolean;
isUpdateable: boolean;
isStar?: boolean;
isPegged?: boolean;
name: string;
};
}
declare function salita(dir: string, options: salita.Options, callback: salita.CB): void;
export = salita;