@@ -83,7 +83,7 @@ export default class NamedChoiceType<E extends object, READ_E extends E = E> ext
8383 super ( )
8484 assert . instanceOf ( constructorTypes , Map )
8585 try { assert . byteUnsignedInteger ( constructorTypes . size ) }
86- catch ( e ) { assert . fail ( `${ constructorTypes . size } types is too many` ) }
86+ catch { assert . fail ( `${ constructorTypes . size } types is too many` ) }
8787 this . indexConstructors = new Map
8888 this . constructorTypes = new Array ( constructorTypes . size )
8989 const usedNames = new Set < string > ( )
@@ -96,7 +96,7 @@ export default class NamedChoiceType<E extends object, READ_E extends E = E> ext
9696 //Name must fit in 255 UTF-8 bytes
9797 const typeNameBuffer = bufferString . fromString ( name )
9898 try { assert . byteUnsignedInteger ( typeNameBuffer . byteLength ) }
99- catch ( e ) { assert . fail ( `Function name "${ name } " is too long` ) }
99+ catch { assert . fail ( `Function name "${ name } " is too long` ) }
100100 assert . instanceOf ( type , StructType )
101101 const constructorIndex = this . indexConstructors . size
102102 this . indexConstructors . set ( constructorIndex , constructor )
@@ -184,7 +184,7 @@ export default class NamedChoiceType<E extends object, READ_E extends E = E> ext
184184 const otherConstructor = otherChoiceType . constructorTypes [ i ]
185185 if ( ! thisConstructor . type . equals ( otherConstructor . type ) ) return false
186186 try { assert . equal ( otherConstructor . nameBuffer , thisConstructor . nameBuffer ) }
187- catch ( e ) { return false }
187+ catch { return false }
188188 }
189189 return true
190190 }
0 commit comments