node-sd-webui icon indicating copy to clipboard operation
node-sd-webui copied to clipboard

Fix TypeScript import for Node16 module resolution mode

Open msujew opened this issue 1 year ago • 0 comments

Closes https://github.com/nerdenough/node-sd-webui/issues/5

For "moduleResolution": "Node16" (i.e. native ESM imports), TypeScript requires a types field in the exports object. This change adds the required field.

Additionally, it exports a few more types, which are very useful in case you actually want to propagate the expected argument types throughout your own adopter code. If unwanted, I can drop the commit again though.

Also fixes the type error related to the fetch API.

msujew avatar Jan 29 '24 20:01 msujew