{"name":"@webgpu/types","version":"0.1.11","license":"Apache-2.0","_id":"@webgpu/types@0.1.11","homepage":"https://github.com/gpuweb/types","bugs":{"url":"https://github.com/gpuweb/types/issues"},"dist":{"shasum":"f7b28ac1feae3f0c3850679966501cdb2afbf25d","tarball":"http://registry-npm.ywwl.com/@webgpu/types/download/@webgpu/types-0.1.11.tgz","fileCount":3,"integrity":"sha512-hz4skElgAhpWOWWDCJSGVlzTAcJ3TBuIA+NI4VZNI13yfm+zhgOg5lTTw5YaYhxWcS3dsLNd7xmNoLkeksW9fQ==","signatures":[{"sig":"MEUCIEjec9cPeDNknXClJld6Dz55QdiNn2BtGsC6Qfy2yltBAiEA78nD25SKxh/MGxPh+obhsXGDhoWxrLQ+iTVExKg/VRo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":78845,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh9H/nCRA9TVsSAnZWagAAPagP/RK5EDCTmquD33aG2CUQ\niMtSGb2CJM8mqXh+cQ/Nzt4Qre20A9lSbjLZR6F3lBjs8zfW8NSakZOEhzYj\nrn27ofCYkyQzQs1lFOblOn0Vf+6EyDolbb9K9vEKxGzWZf9l9D3HJAlo35aU\nMkKXFEoZkT+/DsL9zfoDOYxWQt2Bue+gZAhkuOFgKqJj5jy6HAQz8je2x3KA\nJV53BvHV8B+vzT7B700LAQ9UQKXNadrIKOoM7bVC/w82gxzxG1V6BPsE2svS\nrkeMJ4N+BUUgjHKv1nRwScJcMMeenZHBw0RXMf2nneJLy+OMLNwr+DD7tMPA\ncf09AdMhFCUhon2Uhoiwz2/crMgApYAXqx65VwIjiAa+UpSJMdo/+Zs14L7r\nUvyBhu8XXSHjsPI+WlecvUD+y/5oTPNZCEv65bmWlsxkS6B2u/vxT5mL1qhO\nDz6jmrQ3jWFwP4clKfwL/wFip0yw31OeDVEfe4M1fxCV6ypFYaf7cU6puRJo\nF+z2izD4TdnXjM9sNft8pVZ0KkcllWdVo9sCFogrhGTDSDI9Otg4dYWkvf1m\nSFiWgFTtlLwwjyYUdBK/Uk2dpjhjsY9Ja7LlQCDi45XvEsczl+9BQvmOsN1M\nf8IaFwC3zWJdgwkn8Gr0VbZpyluSrO8GgVjxyEIeE6qAHRaj4VI9Iw5I5AEm\nz9b5\r\n=xl3u\r\n-----END PGP SIGNATURE-----\r\n","size":16045,"noattachment":false,"key":"/@webgpu/types/-/@webgpu/types-0.1.11.tgz"},"main":"","types":"dist/index.d.ts","gitHead":"2788c58c227b579d03948e39eb0d215c75e6c059","scripts":{"format":"prettier -w dist/index.d.ts","generate":"bikeshed-to-ts --in ./gpuweb/spec/index.bs --out ./generated/index.d.ts --forceGlobal --nominal && prettier -w generated/index.d.ts"},"_npmUser":{"name":"kainino","email":"kainino1@gmail.com"},"repository":{"url":"git+https://github.com/gpuweb/types.git","type":"git"},"_npmVersion":"7.11.2","description":"This package defines Typescript types (`.d.ts`) for the upcoming [WebGPU standard](https://github.com/gpuweb/gpuweb/wiki/Implementation-Status).","directories":{},"_nodeVersion":"14.16.1","_hasShrinkwrap":false,"devDependencies":{"prettier":"^2.2.1","bikeshed-to-ts":"^1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/types_0.1.11_1643413479831_0.0038320947340049205","host":"s3://npm-registry-packages"},"readme":"# Typescript Type Definitions for WebGPU\n\nThis package defines Typescript types (`.d.ts`) for the upcoming [WebGPU standard](https://github.com/gpuweb/gpuweb/wiki/Implementation-Status).\n\nUse this package to augment the ambient [`\"dom\"`](https://www.typescriptlang.org/docs/handbook/compiler-options.html#compiler-options) type definitions with the new definitions for WebGPU.\n\n## API style docs\n\nThis repo also generates typedoc docs here: https://gpuweb.github.io/types\n\n## What are declaration files?\n\nSee the [TypeScript handbook](http://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html).\n\n\n## How can I use them?\n\n### Install\n\n- npm: `npm install --save-dev @webgpu/types`\n- yarn: `yarn add --dev @webgpu/types`\n- pnpm: `pnpm add -D @webgpu/types`\n\nIf you are on TypeScript < 5.1, you will also need to install `@types/dom-webcodecs`\nas a sibling dependency. The version you need depends on the TypeScript version;\nsee the [tests](tests/) for examples.\n\n### Configure\n\nSince this package is outside DefinitelyTyped, the dependency won't be picked up automatically.\nThere are several ways to add a additional TypeScript type definition dependencies to your TypeScript project:\n\n#### TypeScript `tsc` and `tsc`-based bundlers\n\nIn `tsconfig.json`:\n\n```js\n{\n  // ...\n  \"compilerOptions\": {\n    // ...\n    \"types\": [\"@webgpu/types\"]\n  }\n}\n```\n\nOr you can use `typeRoots`:\n\n```js\n{\n  // ...\n  \"compilerOptions\": {\n    // ...\n    \"typeRoots\": [\"./node_modules/@webgpu/types\", \"./node_modules/@types\"]\n  }\n}\n```\n\n#### Inline in TypeScript\n\nThis may work better if your toolchain doesn't read `tsconfig.json`.\n\n```ts\n/// <reference types=\"@webgpu/types\" />\n```\n\n#### Webpack\n\nIf you use Webpack and the options above aren't sufficient (this has not been verified),\nyou may need the following in `webpack.config.js`:\n\n```js\n\"types\": [\"@webgpu/types\"]\n```\n\n#### Others?\n\nPlease contribute a PR to add instructions for other setups or improve existing instructions. :)\n\n\n## How to update these types\n\n- Make sure the submodule is checked out: `git submodule update --init`\n- Pull `gpuweb` changes: `pushd gpuweb && git checkout main && git pull && popd`\n- Install dependencies: `npm ci`\n- Bug workaround: paste the `copies.bs` contents in place of its include in `index.bs` (generator doesn't support includes).\n- Generate `generated/index.d.ts`: `npm run generate`\n- Open a diff between `generated/index.d.ts` and `dist/index.d.ts`.\n    The generated file is tracked by Git so you can see what has changed.\n    Update the latter according to changes from the former.\n    Note the `generated/` and `dist/` files are not the same.\n    See below for intentional differences.\n- Format the result: `npm run format`\n\n### Intentional differences between generator output and final result\n\nMost or all of these should be fixed in the generator over time.\n\n- `Array` changed to `Iterable` for WebIDL `sequence`s in argument positions.\n- `any` changed to `object` for WebIDL `object`.\n- `| SharedArrayBuffer` added for `[AllowShared] BufferSource`.\n\nThe following differences are TODO: should be changed in the final result.\n\n- Deprecated items should be removed.\n\nThe following differences will remain.\n\n- `onuncapturederror` strongly typed.\n- `getContext` definitions.\n- `GPUExtent3DStrict` and `GPUOrigin2DStrict`.\n\n### Publish a new npm package version\n\n(only for people who have npm publish access)\n\n* One line cmd to copy-n-paste (for ssh git user, and you'd better know what you are doing, if it failed at certain steps, you might need to clean up git tags before trying again)\n  - `git checkout main && git pull git@github.com:gpuweb/types.git main && git submodule update --init && npm version patch && git push git@github.com:gpuweb/types.git main --tags && npm publish`\n* Separate steps (better for publishing for the first time)\n  * Make sure you are in the upstream repo, not your forked one. And make sure you are synced to latest commit intended for publish\n    - `git checkout main`\n    - `git pull https://github.com/gpuweb/types.git main`\n      - (If you are using HTTPS regularly. You can use remote names like `origin`, just make sure you are referring to the right repo)\n    - `git submodule update --init`\n  * Create the version tag and commit, and push\n    - `npm version patch`\n    - `git push https://github.com/gpuweb/types.git main --tags`\n  * publish the package\n    - `npm publish --otp=<code>`\n      - Replace `<code>` with the one-time password from your authenticator, since two-factors authentication is required to publish.\n      - If you are doing for the first time, you will do `npm adduser` first and it will guide you through adding the npm account.\n\n","publish_time":1643413479967,"maintainers":[{"name":"shrekshao","email":"shrekshao@gmail.com"},{"name":"kainino","email":"kainino1@gmail.com"},{"name":"austineng","email":"austineng.inr@gmail.com"},{"name":"fbeaufort","email":"fbeaufort@google.com"},{"name":"kangz","email":"corentin@wallez.net"},{"name":"toji","email":"tojiro@gmail.com"}],"_cnpm_publish_time":1643413479967,"dist-tags":{"latest":"0.1.74"}}