Closed lebck closed 1 week ago
Thanks for reporting, I'll look into this issue.
I finally looked into this issue. The @types/dom-webcodecs
is now pinned to 0.1.11
temporarily for the following reasons:
0.1.11
is ts5.2
to ts5.6
, so it should work properly in your 5.4.5
project.@types/dom-webcodecs
.overrides
or pnpm.overrides
is a trivial workaround on the consumer side to solve the problem.@types/dom-webcodecs
are related and actually used, so we can get rid of the unwanted side effects:type CanvasImageSourceWebCodecs =
| HTMLOrSVGImageElement
| HTMLVideoElement
| HTMLCanvasElement
| ImageBitmap
| OffscreenCanvas
| VideoFrame;
type ImageBitmapSourceWebCodecs = CanvasImageSourceWebCodecs | Blob | ImageData;
I'm using your library in an angular project which has currently pinned its typescript version to 5.4.5, since the later versions of typescript are not supported yet.
When I install the barcode-detector, the dependency @types/dom-webcodecs will be installed in the latest version 0.1.13 since it is marked with the
^0.1.8
. This uses types not existing in typescript 5.4.5 breaking my compilation.I just explicitly installed
0.1.8
in my project, but a better solution might be to pin your dependency version explicitly to0.1.8
to support a broader range of typescript versions.