cornerstonejs / dicomParser

JavaScript parser for DICOM Part 10 data
MIT License
713 stars 228 forks source link

Type fix: change interface declaration to class for `ByteStream` #207

Closed kmannislands closed 1 year ago

kmannislands commented 2 years ago

Fixes #187

This fixe TypeScript error "'ByteStream' only refers to a type, but is being used as a value here. ts(2693)" when constructing a ByteStream in consuming code like:

import { ByteStream, littleEndianByteArrayParser } from "dicom-parser";

const byteStream = new ByteStream(
  littleEndianByteArrayParser,
  new Uint8Array(0),
  0
);

Personally tested again ts 4.7.3.

ohif-bot commented 1 year ago

:tada: This PR is included in version 1.8.15 :tada:

The release is available on:

Your semantic-release bot :package::rocket: