mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
20 lines
396 B
TypeScript
20 lines
396 B
TypeScript
/// <reference path="./update-notifier.d.ts" />
|
|
|
|
import updateNotifier = require('update-notifier');
|
|
|
|
var notifier = updateNotifier();
|
|
|
|
if (notifier.update) {
|
|
notifier.notify();
|
|
}
|
|
|
|
console.log(notifier.update);
|
|
|
|
var notifier = updateNotifier({
|
|
updateCheckInterval: 1000 * 60 * 60 * 24 * 7 // 1 week
|
|
});
|
|
|
|
if (notifier.update) {
|
|
notifier.notify('Update available: ' + notifier.update.latest);
|
|
}
|