WebGPU TypeScript 类型定义

该软件包为 WebGPU API 提供了 TypeScript 类型定义文件 (.d.ts)。 由于 WebGPU API 尚处于开发阶段,因此该软件包的内容也会随着 API 的变化而更新。

使用方法

  1. 安装: bash npm install --save @webgpu/types # 或 yarn add @webgpu/types
  2. 配置 TypeScript: 在 tsconfig.json 文件中添加 typeRoots 配置: json { "compilerOptions": { "typeRoots": [ "./node_modules/@webgpu/types", "./node_modules/@types" ] } }
zip 文件大小:38.19KB