When use with TypeScript, the type of this property is GPUDevice defined in "@webgpu/types".
Use const device = env.webgpu.device as GPUDevice; in TypeScript to access this property with correct type.
see comments on GpuBufferType for more details about why not use types defined in "@webgpu/types".
Get the device for WebGPU.
When use with TypeScript, the type of this property is
GPUDevice
defined in "@webgpu/types". Useconst device = env.webgpu.device as GPUDevice;
in TypeScript to access this property with correct type.see comments on GpuBufferType for more details about why not use types defined in "@webgpu/types".