@webgpu/types
Advanced tools
Comparing version 0.1.34 to 0.1.35
@@ -6,3 +6,3 @@ { | ||
"bugs": "https://github.com/gpuweb/types/issues", | ||
"version": "0.1.34", | ||
"version": "0.1.35", | ||
"main": "", | ||
@@ -9,0 +9,0 @@ "types": "dist/index.d.ts", |
@@ -29,2 +29,5 @@ # Typescript Type Definitions for WebGPU | ||
Since this package is outside DefinitelyTyped, the dependency won't be picked up automatically. | ||
There are several ways to add a additional TypeScript type definition dependencies to your TypeScript project: | ||
#### TypeScript `tsc` and `tsc`-based bundlers | ||
@@ -39,3 +42,3 @@ | ||
// ... | ||
"typeRoots": [ "./node_modules/@webgpu/types", "./node_modules/@types"] | ||
"types": ["@webgpu/types"] | ||
} | ||
@@ -45,14 +48,18 @@ } | ||
#### Webpack | ||
Or you can use `typeRoots`: | ||
In `webpack.config.js` add: | ||
```js | ||
"types": ["@webgpu/types"] | ||
{ | ||
// ... | ||
"compilerOptions": { | ||
// ... | ||
"typeRoots": ["./node_modules/@webgpu/types", "./node_modules/@types"] | ||
} | ||
} | ||
``` | ||
(may not be necessary with `tsc` config above - untested) | ||
#### Inline in TypeScript | ||
This may work better if your toolchain doesn't read `tsconfig.json`. | ||
```ts | ||
@@ -62,2 +69,11 @@ /// <reference types="@webgpu/types" /> | ||
#### Webpack | ||
If you use Webpack and the options above aren't sufficient (this has not been verified), | ||
you may need the following in `webpack.config.js`: | ||
```js | ||
"types": ["@webgpu/types"] | ||
``` | ||
#### Others? | ||
@@ -64,0 +80,0 @@ |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
112050
3040
132