You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The tsc compiler with remove comments set to false (no --removeComments flag and/or "removeComments": false in tsconfig.json) performs unexpectedly based on whitespace characters surrounding comments before an export statement. For example,
/* @ngInject */export=function($scope: any){// A comment$scope.options={};}
Run the compiler:
$ tsc --module commonjs controller.ts
The compiler strips /* @ngInject */ but preserves // A comment
module.exports=function($scope){// A comment$scope.options={};};
However, *placing a new line after /* @ngInject / keeps it from being removed:
/* @ngInject */export=function($scope: any){// A comment$scope.options={};}
produces
/* @ngInject */export=function($scope: any){// A comment$scope.options={};}
Any idea why tsc is sensitive to such contextual whitespace?
$ tsc -v
message TS6029: Version 1.7.5
The text was updated successfully, but these errors were encountered:
The tsc compiler with remove comments set to false (no --removeComments flag and/or "removeComments": false in tsconfig.json) performs unexpectedly based on whitespace characters surrounding comments before an export statement. For example,
Run the compiler:
The compiler strips /* @ngInject */ but preserves // A comment
However, *placing a new line after /* @ngInject / keeps it from being removed:
produces
Any idea why tsc is sensitive to such contextual whitespace?
The text was updated successfully, but these errors were encountered: