File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ BaseVector.prototype[Symbol.iterator] = function baseVectorSymbolIterator<T exte
134134 VectorCtor . prototype [ 'set' ] = partial2 ( setVisitor . getVisitFn ( typeId ) ) ;
135135 VectorCtor . prototype [ 'indexOf' ] = partial2 ( indexOfVisitor . getVisitFn ( typeId ) ) ;
136136 VectorCtor . prototype [ 'toArray' ] = partial0 ( toArrayVisitor . getVisitFn ( typeId ) ) ;
137- VectorCtor . prototype [ 'getByteWidth' ] = partial0 ( byteWidthVisitor . getVisitFn ( typeId ) ) ;
137+ VectorCtor . prototype [ 'getByteWidth' ] = partialType0 ( byteWidthVisitor . getVisitFn ( typeId ) ) ;
138138 VectorCtor . prototype [ Symbol . iterator ] = partial0 ( iteratorVisitor . getVisitFn ( typeId ) ) ;
139139 } ) ;
140140 } ) ;
@@ -144,6 +144,11 @@ function partial0<T>(visit: (node: T) => any) {
144144 return function ( this : T ) { return visit ( this ) ; } ;
145145}
146146
147+ /** @ignore */
148+ function partialType0 < T extends Vector > ( visit : ( node : T [ 'type' ] ) => any ) {
149+ return function ( this : T ) { return visit ( this . type ) ; } ;
150+ }
151+
147152/** @ignore */
148153function partial1 < T > ( visit : ( node : T , a : any ) => any ) {
149154 return function ( this : T , a : any ) { return visit ( this , a ) ; } ;
You can’t perform that action at this time.
0 commit comments