comparison Platforms/Wasm/logger.ts @ 785:67d0a8da4afe am-dev

made typescript more future-proof (not completed, I finally disabled a few warnings in my tsconfig.json)
author Alain Mazy <alain@mazy.be>
date Mon, 27 May 2019 22:41:51 +0200
parents 4eccf698e52f
children
comparison
equal deleted inserted replaced
772:cfb4d39065a4 785:67d0a8da4afe
71 } 71 }
72 72
73 73
74 private getOutput(source: LogSource, args: any[]): any[] { 74 private getOutput(source: LogSource, args: any[]): any[] {
75 var prefix = this.getPrefix(); 75 var prefix = this.getPrefix();
76 var prefixAndSource = []; 76 var prefixAndSource = Array<string>();
77 77
78 if (prefix != null) { 78 if (prefix != null) {
79 prefixAndSource = [prefix]; 79 prefixAndSource = [prefix];
80 } 80 }
81 81
92 } 92 }
93 93
94 return [...prefixAndSource, ...args]; 94 return [...prefixAndSource, ...args];
95 } 95 }
96 96
97 protected getPrefix(): string { 97 protected getPrefix(): string | null {
98 return null; 98 return null;
99 } 99 }
100 } 100 }
101 101
102 export class TimeConsoleLogger extends StandardConsoleLogger { 102 export class TimeConsoleLogger extends StandardConsoleLogger {