forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
update-notifier.d.ts
36 lines (30 loc) · 1022 Bytes
/
update-notifier.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
// Type definitions for update-notifier
// Project: https://github.com/yeoman/update-notifier
// Definitions by: vvakame <https://github.com/vvakame>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module "update-notifier" {
function t(settings?:t.ISettings):t.IResult;
namespace t {
export interface IResult {
update: IUpdateInfo;
notify(message?:string):void;
}
export interface ISettings {
callback?:(error:any, update?:IUpdateInfo)=>any; // default null
packagePath?:string; // default 'package.json'
packageName?:string; // default Inferred from packageFile
packageVersion?:string; // default Inferred from packageFile
updateCheckInterval?:number; // default 1000 * 60 * 60 * 24 (1 day)
updateCheckTimeout?:number; // default 20000 (20 secs)
registryUrl?:string; // default 'http://registry.npmjs.org/%s'
}
export interface IUpdateInfo {
latest:string;
current:string;
type:string;
date:string;
name:string;
}
}
export = t;
}