From 969eb76ccc170a6fd4a9ec794e0041db492bdabe Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 11 Jan 2018 14:34:53 -0500 Subject: [PATCH] added typings to tools components --- src/popup/app/tools/export.component.ts | 7 +++++-- .../app/tools/password-generator-history.component.ts | 6 ++++-- src/popup/app/tools/password-generator.component.ts | 5 +++-- src/popup/app/tools/tools.component.ts | 3 ++- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/popup/app/tools/export.component.ts b/src/popup/app/tools/export.component.ts index 3898ebfa7a..c9608be965 100644 --- a/src/popup/app/tools/export.component.ts +++ b/src/popup/app/tools/export.component.ts @@ -4,7 +4,10 @@ import * as template from './export.component.html'; import { CipherType } from 'jslib/enums/cipherType'; +import { CipherService } from 'jslib/abstractions/cipher.service'; import { CryptoService } from 'jslib/abstractions/crypto.service'; +import { FolderService } from 'jslib/abstractions/folder.service'; +import { UserService } from 'jslib/abstractions/user.service'; import { UtilsService } from 'jslib/abstractions/utils.service'; export class ExportController { @@ -13,8 +16,8 @@ export class ExportController { constructor(private $state: any, private cryptoService: CryptoService, private toastr: any, private utilsService: UtilsService, private $analytics: any, - private i18nService: any, private folderService: any, private cipherService: any, - private $window: ng.IWindowService, private userService: any) { + private i18nService: any, private folderService: FolderService, private cipherService: CipherService, + private $window: ng.IWindowService, private userService: UserService) { this.i18n = i18nService; } diff --git a/src/popup/app/tools/password-generator-history.component.ts b/src/popup/app/tools/password-generator-history.component.ts index fb18ccb2b0..dade6e5cc9 100644 --- a/src/popup/app/tools/password-generator-history.component.ts +++ b/src/popup/app/tools/password-generator-history.component.ts @@ -2,6 +2,8 @@ import * as template from './password-generator-history.component.html'; import { PasswordHistory } from 'jslib/models/domain/passwordHistory'; +import { PasswordGenerationService } from 'jslib/abstractions/passwordGeneration.service'; + export class PasswordGeneratorHistoryController { $transition$: any; history: PasswordHistory[]; @@ -9,8 +11,8 @@ export class PasswordGeneratorHistoryController { addState: any; i18n: any; - constructor(private $state: any, private passwordGenerationService: any, private toastr: any, - private $analytics: any, private i18nService: any) { + constructor(private $state: any, private passwordGenerationService: PasswordGenerationService, + private toastr: any, private $analytics: any, private i18nService: any) { this.i18n = i18nService; this.history = passwordGenerationService.getHistory(); } diff --git a/src/popup/app/tools/password-generator.component.ts b/src/popup/app/tools/password-generator.component.ts index ca1596f88e..e4a32b1958 100644 --- a/src/popup/app/tools/password-generator.component.ts +++ b/src/popup/app/tools/password-generator.component.ts @@ -1,18 +1,19 @@ import * as angular from 'angular'; import * as template from './password-generator.component.html'; +import { PasswordGenerationService } from 'jslib/abstractions/passwordGeneration.service'; import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service'; export class PasswordGeneratorController { $transition$: any; options: any; - showSelect: any; + showSelect: boolean; password: string = '-'; editState: any; addState: any; i18n: any; - constructor(private $state: any, private passwordGenerationService: any, + constructor(private $state: any, private passwordGenerationService: PasswordGenerationService, private toastr: any, private platformUtilsService: PlatformUtilsService, private $analytics: any, private i18nService: any, private $timeout: ng.ITimeoutService) { this.i18n = i18nService; diff --git a/src/popup/app/tools/tools.component.ts b/src/popup/app/tools/tools.component.ts index 61a484f676..395c4c6cf6 100644 --- a/src/popup/app/tools/tools.component.ts +++ b/src/popup/app/tools/tools.component.ts @@ -1,5 +1,6 @@ import * as template from './tools.component.html'; +import { EnvironmentService } from 'jslib/abstractions/environment.service'; import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service'; export class ToolsController { @@ -9,7 +10,7 @@ export class ToolsController { constructor(private SweetAlert: any, private i18nService: any, private $analytics: any, private platformUtilsService: PlatformUtilsService, - private environmentService: any) { + private environmentService: EnvironmentService) { this.i18n = i18nService; this.showExport = !platformUtilsService.isEdge(); if (environmentService.baseUrl) {