You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importwrapExceptionfrom'@ts-to-go/wrap-exception'wrapException(myFn)// this is not callable and fails TS transpilationwrapException.default(myFn)// this is callable
It would be nice if the lib could improve the ESM <> CJS interoperability.
Current behavior
The lib only exports CJS with a __esModule flag.
See Are the Types Wrong
More in depth information:
https://www.typescriptlang.org/docs/handbook/modules/appendices/esm-cjs-interop.html#no-__esmodule-detection-the-double-default-problem
evanw/esbuild#1719
Expected behavior
Lib works both in ESModules and CJS.
The text was updated successfully, but these errors were encountered: