BufferGeometryUtils mergeVertices not available in typeScript

I am trying to convert non-indexed geometry to indexed geometry using “BufferGeometryUtils.mergeVertices” in typeScript.

But error occcured
“Property ‘mergeVertices’ does not exist on type ‘typeof BufferGeometryUtils’”

mergeVertices() is a method of BufferGeometryUtils, not a property.

1 Like

Please see this, I have used it as method

BufferGeometryUtils.mergeVertices(obj.children[0].geometry)

found my error.

I am importing BufferGeometryUtils from three instead of utils

1 Like

it should be imported from
import * as BufferGeometryUtils from 'three/addons/utils/BufferGeometryUtils.js';

Yes. Initially three js exporting whole BufferGeometryUtils class.

Now three js exporting individuals functions,