In order to access the data, I often see something similar in javascript code:
import vtkLiteHttpDataAccessHelper from '@kitware/vtk.js/IO/Core/DataAccessHelper/LiteHttpDataAccessHelper';
const zipFileData = await vtkLiteHttpDataAccessHelper.fetchBinary(
'https://data.kitware.com/api/v1/item/63c1c7f96d3fc641a02d7f27/download'
);
However, when I try to use it in a typescript project I get:
TS6133: vtkLiteHttpDataAccessHelper is declared but its value is never read.
TS2693: vtkLiteHttpDataAccessHelper only refers to a type, but is being used as a value here.
The only solution right now is to ignore the errors
import _vtkLiteHttpDataAccessHelper from '@kitware/vtk.js/IO/Core/DataAccessHelper/LiteHttpDataAccessHelper';
// @ts-expect-error Expecting TS2693, but it will work
const zipFileData = await _vtkLiteHttpDataAccessHelper.fetchBinary(
'https://data.kitware.com/api/v1/item/63c1c7f96d3fc641a02d7f27/download'
);
Is there a good way to use the LiteHttpDataAccessHelper in a typescript project or perhaps there is some documenation I couldn’t find?
Would be happy to contribute to documentation, for example to Introduction section here DataAccessHelper | vtk.js , if this gets resolved.
Maybe related to: Models served from a servlet