aboutsummaryrefslogtreecommitdiff
path: root/src/background/usecases/VersionUseCase.ts
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-05-01 11:04:24 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2019-05-02 22:07:53 +0900
commit678020a3a27713e77ec8d74483122b4258fbc829 (patch)
tree6c84d0965f05918e6fd58a0a155c15035474d563 /src/background/usecases/VersionUseCase.ts
parent0cffb09e249832291be73be039dc1b9bb38115f9 (diff)
Types on src/background
Diffstat (limited to 'src/background/usecases/VersionUseCase.ts')
-rw-r--r--src/background/usecases/VersionUseCase.ts10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/background/usecases/VersionUseCase.ts b/src/background/usecases/VersionUseCase.ts
index ed5112b..207f9e2 100644
--- a/src/background/usecases/VersionUseCase.ts
+++ b/src/background/usecases/VersionUseCase.ts
@@ -3,21 +3,25 @@ import TabPresenter from '../presenters/TabPresenter';
import NotifyPresenter from '../presenters/NotifyPresenter';
export default class VersionUseCase {
+ private tabPresenter: TabPresenter;
+
+ private notifyPresenter: NotifyPresenter;
+
constructor() {
this.tabPresenter = new TabPresenter();
this.notifyPresenter = new NotifyPresenter();
}
- notify() {
+ notify(): Promise<string> {
let title = `Vim Vixen ${manifest.version} has been installed`;
let message = 'Click here to see release notes';
let url = this.releaseNoteUrl(manifest.version);
- this.notifyPresenter.notify(title, message, () => {
+ return this.notifyPresenter.notify(title, message, () => {
this.tabPresenter.create(url);
});
}
- releaseNoteUrl(version) {
+ releaseNoteUrl(version?: string): string {
if (version) {
return `https://github.com/ueokande/vim-vixen/releases/tag/${version}`;
}