File tree Expand file tree Collapse file tree 2 files changed +0
-38
lines changed
packages/angular_devkit/build_optimizer/src/transforms Expand file tree Collapse file tree 2 files changed +0
-38
lines changed Original file line number Diff line number Diff line change @@ -322,15 +322,7 @@ function findStatements(
322
322
323
323
for ( let index = statementIndex + 1 ; index < statements . length ; ++ index ) {
324
324
const statement = statements [ index ] ;
325
-
326
325
if ( ! ts . isExpressionStatement ( statement ) ) {
327
- // The below is a workaround for NGCC as TS will never emit an EmptyStatement.
328
- // See: https://github.com/angular/angular-cli/issues/16509#issuecomment-570198398
329
- if ( ts . isEmptyStatement ( statement ) ) {
330
- count ++ ;
331
- continue ;
332
- }
333
-
334
326
break ;
335
327
}
336
328
Original file line number Diff line number Diff line change @@ -88,36 +88,6 @@ describe('wrap enums and classes transformer', () => {
88
88
expect ( tags . oneLine `${ transform ( input ) } ` ) . toEqual ( tags . oneLine `${ output } ` ) ;
89
89
} ) ;
90
90
91
- it ( 'should wrap classes which contain EmptyStatement' , ( ) => {
92
- const input = tags . stripIndent `
93
- let JigsawTrustedHtml = JigsawTrustedHtml_1 = class JigsawTrustedHtml {
94
- constructor(_sanitizer, zone) {
95
- }
96
- static _getContext(magicNumber) {
97
- return JigsawTrustedHtml_1._contexts[magicNumber];
98
- }
99
- };
100
- JigsawTrustedHtml.ɵfac = function JigsawTrustedHtml_Factory(t) { };
101
- // NGCC outputs an empty statement sometimes like the below:
102
- // https://github.com/angular/angular-cli/issues/16509#issuecomment-570198398
103
- JigsawTrustedHtml.ɵdir = ɵngcc0.ɵɵdefineDirective(); ;
104
- JigsawTrustedHtml.ctorParameters = () => [
105
- { type: DomSanitizer },
106
- { type: NgZone }
107
- ];
108
- ` ;
109
-
110
- const output = tags . stripIndent `
111
- let JigsawTrustedHtml = /*@__PURE__*/ (() => {
112
- ${ input }
113
-
114
- return JigsawTrustedHtml;
115
- })();
116
- ` ;
117
-
118
- expect ( tags . oneLine `${ transform ( input ) } ` ) . toEqual ( tags . oneLine `${ output } ` ) ;
119
- } ) ;
120
-
121
91
it ( 'should not wrap enum like which are inside of methods' , ( ) => {
122
92
const input = tags . stripIndent `
123
93
class LayoutDirective {
You can’t perform that action at this time.
0 commit comments