Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ types Public
forked from gpuweb/types

TypeScript type definitions for WebGPU (NOTE: the WebGPU API itself is still unstable! These types do not directly reflect an exact specification revision or the implementation status of any browser! https://webgpu.io/)

Notifications You must be signed in to change notification settings

Kangz/types

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Typescript Type Definitions for WebGPU

This package defines Typescript types (.d.ts) for the upcoming WebGPU standard.

This package matches the work-in-progress WebGPU API, which is currently unstable!

Use this package to augment the ambient "dom" type definitions with the new definitions for WebGPU.

What are declaration files?

See the TypeScript handbook.

How can I use them?

Install

  • npm: npm install --save @webgpu/types
  • yarn: yarn add @webgpu/types

Configure

TypeScript tsc and tsc-based bundlers

In tsconfig.json:

{
  // ...
  "compilerOptions": {
    // ...
    "typeRoots": [ "./node_modules/@webgpu/types", "./node_modules/@types"]
  }
}

Webpack

In webpack.config.js add:

"types": ["@webgpu/types"]

(may not be necessary with tsc config above - untested)

Inline in TypeScript

/// <reference types="@webgpu/types" />

Others?

Please contribute a PR to add instructions for other setups or improve existing instructions. :)

About

TypeScript type definitions for WebGPU (NOTE: the WebGPU API itself is still unstable! These types do not directly reflect an exact specification revision or the implementation status of any browser! https://webgpu.io/)

Resources

Stars

Watchers

Forks

Packages

No packages published