From d5e5550c54102ca3e1ddf3988139f036a09bcd9a Mon Sep 17 00:00:00 2001 From: tykayn Date: Sun, 11 Aug 2019 16:21:49 +0200 Subject: [PATCH] :zap: change privacy of properties --- src/app/debugger/debugger.component.ts | 4 ++-- .../form-container/form-container.component.ts | 5 +---- src/app/pages/answers/answers.component.ts | 2 +- src/app/pages/base-page/base.component.ts | 3 +-- src/app/pages/dates/dates.component.ts | 2 +- src/app/pages/kind/kind.component.ts | 2 +- src/app/pages/pictures/pictures.component.ts | 2 +- src/app/pages/resume/resume.component.ts | 2 +- .../pages/visibility/visibility.component.ts | 18 +++++++++--------- src/app/ui/navigation/navigation.component.ts | 2 +- tsconfig.json | 2 +- 11 files changed, 20 insertions(+), 24 deletions(-) diff --git a/src/app/debugger/debugger.component.ts b/src/app/debugger/debugger.component.ts index 7b84841a..6b08ea6b 100644 --- a/src/app/debugger/debugger.component.ts +++ b/src/app/debugger/debugger.component.ts @@ -7,9 +7,9 @@ import {ConfigService} from '../config.service'; styleUrls: ['./debugger.component.scss'] }) export class DebuggerComponent implements OnInit { - private formIsValid = true; + formIsValid = true; - constructor(private config: ConfigService) { + constructor(public config: ConfigService) { } ngOnInit() { diff --git a/src/app/form-container/form-container.component.ts b/src/app/form-container/form-container.component.ts index 8ce3d487..4767ddf0 100644 --- a/src/app/form-container/form-container.component.ts +++ b/src/app/form-container/form-container.component.ts @@ -14,10 +14,7 @@ import {ConfigService} from '../config.service'; */ export class FormContainerComponent implements OnInit { - private progressionStep = 0; - - - constructor(private config: ConfigService) { + constructor(public config: ConfigService) { } diff --git a/src/app/pages/answers/answers.component.ts b/src/app/pages/answers/answers.component.ts index 97071057..48116555 100644 --- a/src/app/pages/answers/answers.component.ts +++ b/src/app/pages/answers/answers.component.ts @@ -13,7 +13,7 @@ export class AnswersComponent extends BaseComponent implements OnInit { private answerList = []; - constructor(config: ConfigService, + constructor(public config: ConfigService, @Inject(DOCUMENT) private document: any, private cd: ChangeDetectorRef) { super(config); diff --git a/src/app/pages/base-page/base.component.ts b/src/app/pages/base-page/base.component.ts index 32f97e97..660f90b9 100644 --- a/src/app/pages/base-page/base.component.ts +++ b/src/app/pages/base-page/base.component.ts @@ -11,14 +11,13 @@ import {ConfigService} from '../../config.service'; */ export class BaseComponent implements OnInit { - constructor(protected config: ConfigService) { + constructor(config: ConfigService) { } ngOnInit() { } - checkValidity() { // TODO with form controls return true; diff --git a/src/app/pages/dates/dates.component.ts b/src/app/pages/dates/dates.component.ts index b7b177a7..51fa4305 100644 --- a/src/app/pages/dates/dates.component.ts +++ b/src/app/pages/dates/dates.component.ts @@ -9,7 +9,7 @@ import {BaseComponent} from '../base-page/base.component'; }) export class DatesComponent extends BaseComponent implements OnInit { - constructor(config: ConfigService) { + constructor(public config: ConfigService) { super(config); } diff --git a/src/app/pages/kind/kind.component.ts b/src/app/pages/kind/kind.component.ts index 733cdca3..2724c701 100644 --- a/src/app/pages/kind/kind.component.ts +++ b/src/app/pages/kind/kind.component.ts @@ -9,7 +9,7 @@ import {ConfigService} from '../../config.service'; }) export class KindComponent extends BaseComponent implements OnInit { - constructor(config: ConfigService) { + constructor(public config: ConfigService) { super(config); } diff --git a/src/app/pages/pictures/pictures.component.ts b/src/app/pages/pictures/pictures.component.ts index aa4d8603..624e95a2 100644 --- a/src/app/pages/pictures/pictures.component.ts +++ b/src/app/pages/pictures/pictures.component.ts @@ -9,7 +9,7 @@ import {BaseComponent} from '../base-page/base.component'; }) export class PicturesComponent extends BaseComponent implements OnInit { - constructor(config: ConfigService) { + constructor(public config: ConfigService) { super(config); } diff --git a/src/app/pages/resume/resume.component.ts b/src/app/pages/resume/resume.component.ts index b76f231d..027fe685 100644 --- a/src/app/pages/resume/resume.component.ts +++ b/src/app/pages/resume/resume.component.ts @@ -9,7 +9,7 @@ import {ConfigService} from '../../config.service'; }) export class ResumeComponent extends BaseComponent implements OnInit { - constructor(config: ConfigService) { + constructor(public config: ConfigService) { super(config); } diff --git a/src/app/pages/visibility/visibility.component.ts b/src/app/pages/visibility/visibility.component.ts index 8129ba25..ab66c675 100644 --- a/src/app/pages/visibility/visibility.component.ts +++ b/src/app/pages/visibility/visibility.component.ts @@ -1,19 +1,19 @@ -import { Component, OnInit } from '@angular/core'; +import {Component, OnInit} from '@angular/core'; import {BaseComponent} from '../base-page/base.component'; import {ConfigService} from '../../config.service'; @Component({ - selector: 'framadate-visibility', - templateUrl: './visibility.component.html', - styleUrls: ['./visibility.component.scss'] + selector: 'framadate-visibility', + templateUrl: './visibility.component.html', + styleUrls: ['./visibility.component.scss'] }) export class VisibilityComponent extends BaseComponent implements OnInit { - constructor(config: ConfigService) { - super(config); - } + constructor(public config: ConfigService) { + super(config); + } - ngOnInit() { - } + ngOnInit() { + } } diff --git a/src/app/ui/navigation/navigation.component.ts b/src/app/ui/navigation/navigation.component.ts index 46501235..52bd53d7 100644 --- a/src/app/ui/navigation/navigation.component.ts +++ b/src/app/ui/navigation/navigation.component.ts @@ -9,7 +9,7 @@ import {ConfigService} from '../../config.service'; }) export class NavigationComponent extends BaseComponent implements OnInit { - constructor(config: ConfigService) { + constructor(public config: ConfigService) { super(config); } diff --git a/tsconfig.json b/tsconfig.json index 30956ae7..ee5edf6d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,7 +10,7 @@ "module": "esnext", "moduleResolution": "node", "importHelpers": true, - "target": "es2015", + "target": "es2018", "typeRoots": [ "node_modules/@types" ],