@@ -4,11 +4,6 @@ import {convertDecorators} from 'tsickle';
4
4
import { NodeReflectorHost } from './reflector_host' ;
5
5
import { AngularCompilerOptions } from './codegen' ;
6
6
7
- const DEBUG = false ;
8
- function debug ( msg : string , ...o : any [ ] ) {
9
- if ( DEBUG ) console . log ( msg , ...o ) ;
10
- }
11
-
12
7
/**
13
8
* Implementation of CompilerHost that forwards all methods to another instance.
14
9
* Useful for partial implementations to override only methods they care about.
@@ -37,11 +32,12 @@ export abstract class DelegatingHost implements ts.CompilerHost {
37
32
export class TsickleHost extends DelegatingHost {
38
33
// Additional diagnostics gathered by pre- and post-emit transformations.
39
34
public diagnostics : ts . Diagnostic [ ] = [ ] ;
40
- private TSICKLE_SUPPORT = `interface DecoratorInvocation {
41
- type: Function;
42
- args?: any[];
43
- }
44
- ` ;
35
+ private TSICKLE_SUPPORT = `
36
+ interface DecoratorInvocation {
37
+ type: Function;
38
+ args?: any[];
39
+ }
40
+ ` ;
45
41
constructor ( delegate : ts . CompilerHost , private options : ts . CompilerOptions ) { super ( delegate ) ; }
46
42
47
43
getSourceFile =
@@ -53,8 +49,7 @@ export class TsickleHost extends DelegatingHost {
53
49
if ( converted . diagnostics ) {
54
50
this . diagnostics . push ( ...converted . diagnostics ) ;
55
51
}
56
- newContent = this . TSICKLE_SUPPORT + converted . output ;
57
- debug ( newContent ) ;
52
+ newContent = converted . output + this . TSICKLE_SUPPORT ;
58
53
}
59
54
return ts . createSourceFile ( fileName , newContent , languageVersion , true ) ;
60
55
}
0 commit comments