Corrected some linting errors.
This commit is contained in:
parent
9ffbee6e0d
commit
4f1a52a1b0
31 changed files with 179 additions and 178 deletions
|
@ -1,9 +1,9 @@
|
|||
import {Component, OnInit} from "@angular/core";
|
||||
import {ConverterRegistryService} from "./converterregistry.service";
|
||||
import {InputComponentManagerService} from "./inputcomponentmanager.service";
|
||||
import {NativeLibraryWrapperService} from "./nativelibrarywrapper.service";
|
||||
import {Step} from "./step";
|
||||
import {Converter} from "./converter/converter";
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {ConverterRegistryService} from './converterregistry.service';
|
||||
import {InputComponentManagerService} from './inputcomponentmanager.service';
|
||||
import {NativeLibraryWrapperService} from './nativelibrarywrapper.service';
|
||||
import {Step} from './step';
|
||||
import {Converter} from './converter/converter';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
|
@ -15,7 +15,8 @@ export class AppComponent implements OnInit {
|
|||
public steps: Step[] = [];
|
||||
public converters: Converter[] = [];
|
||||
|
||||
constructor(private converterRegistryService: ConverterRegistryService, private inputComponentManagerService: InputComponentManagerService) {
|
||||
constructor(private converterRegistryService: ConverterRegistryService,
|
||||
private inputComponentManagerService: InputComponentManagerService) {
|
||||
}
|
||||
|
||||
convert(step: Step, $event: any): void {
|
||||
|
@ -24,15 +25,15 @@ export class AppComponent implements OnInit {
|
|||
}
|
||||
|
||||
update(step: Step): void {
|
||||
let converter: Converter = step.selectedConverter;
|
||||
const converter: Converter = step.selectedConverter;
|
||||
|
||||
if (converter !== undefined) {
|
||||
let content: string = step.content;
|
||||
const content: string = step.content;
|
||||
let result: string;
|
||||
try {
|
||||
result = converter.convert(content);
|
||||
} catch (error) {
|
||||
if (typeof console === "object" && typeof console.log === "function") {
|
||||
if (typeof console === 'object' && typeof console.log === 'function') {
|
||||
console.log(error);
|
||||
}
|
||||
step.message = error.message;
|
||||
|
@ -40,10 +41,10 @@ export class AppComponent implements OnInit {
|
|||
result = null;
|
||||
}
|
||||
if (result !== null) {
|
||||
step.message = "";
|
||||
step.message = '';
|
||||
step.error = false;
|
||||
if (result !== "") {
|
||||
let nextComponent: Step = this.inputComponentManagerService.getNext(step);
|
||||
if (result !== '') {
|
||||
const nextComponent: Step = this.inputComponentManagerService.getNext(step);
|
||||
nextComponent.content = result;
|
||||
this.update(nextComponent);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue