gpuweb / types

TypeScript type definitions for WebGPU https://gpuweb.github.io/types/
https://www.npmjs.com/package/@webgpu/types
BSD 3-Clause "New" or "Revised" License
189 stars 38 forks source link

Cannot find name 'VideoFrame'. #142

Closed XorTdsc closed 1 year ago

XorTdsc commented 1 year ago

I'm trying to make my first steps with WebGPU using TypeScript/Angular and wanted to user you types. However upon calling ng serve I'll get the two errors:

Error: node_modules/@webgpu/types/dist/index.d.ts:85:7 - error TS2304: Cannot find name 'VideoFrame'.
Error: node_modules/@webgpu/types/dist/index.d.ts:811:7 - error TS2304: Cannot find name 'VideoFrame'.

Suggested by this post, I already tried to install @types/dom-webcodecs as well, without success. Can somebody suggest a solution to this ?

kainino0x commented 1 year ago

You need either a newer version of Typescript or an older version of @types/dom-webcodecs. See https://github.com/gpuweb/types/issues/127#issuecomment-1599775375