filestack / filestack-js

Official Javascript SDK for the Filestack API and content ingestion system.
https://www.filestack.com
MIT License
206 stars 77 forks source link

Use filestack-js in typescript without importing node js types #354

Open jefshe opened 4 years ago

jefshe commented 4 years ago

We deliberately exclude node js types from our build as they cause type errors with our own types for client side.

When importing filestack we get type errors as they explicitly import node types. Any way we can work around this issue? Why do they import node types if we're building for client js?

I guess this is because typescript looks at the "main" field of the package.json file instead of the "browser"

jefshe commented 4 years ago

This problem means we have to exclude typing entirely from this package to get this working for the browser. It would be nice if this package was written in such a way to not make this necessary