You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PS C:\Users\DazeCake\Development\LittleHandy> node "c:\Users\DazeCake\Development\LittleHandy\app.js"
c:\Users\DazeCake\Development\LittleHandy\node_modules\@arkntools\depot-recognition\dist\index.js:380
const imgData = new ImageData(new Uint8ClampedArray(img.bitmap.data), img.bitmap.width, img.bitmap.height);
^
ReferenceError: ImageData is not defined
at c:\Users\DazeCake\Development\LittleHandy\node_modules\@arkntools\depot-recognition\dist\index.js:380:19
at Array.map (<anonymous>)
at recognizeNumbers (c:\Users\DazeCake\Development\LittleHandy\node_modules\@arkntools\depot-recognition\dist\index.js:378:57)
at DeportRecognizer.recognize (c:\Users\DazeCake\Development\LittleHandy\node_modules\@arkntools\depot-recognition\dist\index.js:546:30)
at async c:\Users\DazeCake\Development\LittleHandy\app.js:29:22
Node.js v18.16.0
在vsc中尝试跳转可以跳转到位于本地路径~\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\lib.dom.d.ts中的此类型定义如下
/** The underlying pixel data of an area of a <canvas> element. It is created using the ImageData() constructor or creator methods on the CanvasRenderingContext2D object associated with a canvas: createImageData() and getImageData(). It can also be used to set a part of the canvas by using putImageData(). */interfaceImageData{readonly colorSpace: PredefinedColorSpace;/** Returns the one-dimensional array containing the data in RGBA order, as integers in the range 0 to 255. */
readonly data: Uint8ClampedArray;/** Returns the actual dimensions of the data in the ImageData object, in pixels. */
readonly height: number;/** Returns the actual dimensions of the data in the ImageData object, in pixels. */
readonly width: number;}declarevar ImageData: {
prototype: ImageData;new(sw: number,sh: number,settings?: ImageDataSettings): ImageData;new(data: Uint8ClampedArray,sw: number,sh?: number,settings?: ImageDataSettings): ImageData;};
可能的解决措施
或许可以手动实现此类型?
The text was updated successfully, but these errors were encountered:
环境
node: v18.16.0
OS: win11
问题描述
在运行文档中给出的示例后,提示如下错误
在vsc中尝试跳转可以跳转到位于本地路径
~\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\lib.dom.d.ts
中的此类型定义如下可能的解决措施
或许可以手动实现此类型?
The text was updated successfully, but these errors were encountered: