@@ -66,7 +66,7 @@ const MECHANISM_FUNCTION = {
6666 * Returns the state of this block as a JSON serializable object.
6767 */
6868 saveExtraState : function ( this : MechanismBlock ) : MechanismExtraState {
69- let extraState : MechanismExtraState = {
69+ const extraState : MechanismExtraState = {
7070 } ;
7171 extraState . params = [ ] ;
7272 this . mrcArgs . forEach ( ( arg ) => {
@@ -103,7 +103,7 @@ const MECHANISM_FUNCTION = {
103103 */
104104 updateBlock_ : function ( this : MechanismBlock ) : void {
105105 // Add input sockets for the arguments.
106- for ( let i = 0 ; i < this . mrcArgs . length ; i ++ ) {
106+ for ( const i = 0 ; i < this . mrcArgs . length ; i ++ ) {
107107 const input = this . appendValueInput ( 'ARG' + i )
108108 . setAlign ( Blockly . inputs . Align . RIGHT )
109109 . appendField ( this . mrcArgs [ i ] . name ) ;
@@ -129,15 +129,15 @@ export const pythonFromBlock = function (
129129 let code = 'self.mechanisms["' + mechanismBlock . getFieldValue ( 'NAME' ) + '"] = '
130130 + mechanismBlock . getFieldValue ( 'TYPE' ) + '('
131131
132- for ( let i = 0 ; i < mechanismBlock . mrcArgs . length ; i ++ ) {
133- let fieldName = 'ARG' + i ;
132+ for ( const i = 0 ; i < mechanismBlock . mrcArgs . length ; i ++ ) {
133+ const fieldName = 'ARG' + i ;
134134 if ( i != 0 ) {
135135 code += ', '
136136 }
137137 code += mechanismBlock . mrcArgs [ i ] . name + ' = ' + generator . valueToCode ( mechanismBlock , fieldName , Order . NONE ) ;
138138 }
139139
140- code += ')' + "\n"
140+ code += ')' + "\n" ;
141141
142142 return code
143143}
0 commit comments