File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed
Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -112,17 +112,10 @@ class PreferConstWalker extends Lint.RuleWalker {
112112 this . markAssignment ( ( element as ts . ShorthandPropertyAssignment ) . name ) ;
113113 }
114114 else if ( kind === ts . SyntaxKind . PropertyAssignment ) {
115- const rhs = ( element as ts . PropertyAssignment ) . initializer ;
116-
117- if ( rhs . kind === ts . SyntaxKind . Identifier ) {
118- this . markAssignment ( rhs as ts . Identifier ) ;
119- }
120- else if ( rhs . kind === ts . SyntaxKind . ObjectLiteralExpression || rhs . kind === ts . SyntaxKind . ArrayLiteralExpression ) {
121- this . visitBindingLiteralExpression ( rhs as ts . ObjectLiteralExpression | ts . ArrayLiteralExpression ) ;
122- }
123- else {
124- // Should be an error, but do nothing for now.
125- }
115+ this . visitLHSExpressions ( ( element as ts . PropertyAssignment ) . initializer ) ;
116+ }
117+ else {
118+ // Should we throw an exception?
126119 }
127120 }
128121 }
You can’t perform that action at this time.
0 commit comments