Consider providing ES6 module distribution
Currently, all WebGPU types are added to the global ambients. The option to have them scoped as a module rather than global would be very helpful for me.
Working on large projects, particularly with graphics hardware abstraction layers, types such as GPUBuffer conflict with types already in the engine. For this reason as well as for overall organization and transparency into where the symbols came from in source code, it would be nice to be able to import these types from the package at the top of our ES6 files, as a module.
An additional distribution file that has all the export keywords added could be a solution, since bikeshed-to-ts does seem to have that feature, and typescript would see such a file as a module. Another idea might be to provide a dist file that simply has a declare module wrapper.
For clarity, here's an example of what I'm trying to do:
import type { GPUBuffer } from '@webgpu/types'
// use GPUBuffer
or
import type { GPUBuffer as WebGPUGPUBuffer } from '@webgpu/types'
// use WebGPUGPUBuffer
or
import * as WebGPU from '@webgpu/types'
// use WebGPU.GPUBuffer
Currently, we get
File '.../node_modules/@webgpu/types/dist/index.d.ts' is not a module.