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
This is very minor but does not look like it is documented in the README (or I missed it).
I am in the process of changing a code base from cjs require to esm import and fell in the trap that I thought I could replace
constF=require("fluture")// with importFfrom"fluture"
In the former case, F would have F.Future etc. but when importing as esm, F = Future.
The work-around is to use:
import*asFfrom'fluture'
It would be nice, if it's was import F from... and import { Future } from .... Perhaps this is deliberate but then it should be written in the README ;)
I did play around with index.js a little to see if I could mimic the behaviour of index.cjs but it quickly got ugly. So I'm all for documenting the difference between the two "import" methods. Basically, add a little bit more to https://github.com/fluture-js/Fluture?tab=readme-ov-file#ecmascript-module.
My issue with single name imports, is that I have to do this little ceremony, in order to get Sanctuary to understand the Fluture types, before I can use it anywhere else in my code.
This is very minor but does not look like it is documented in the README (or I missed it).
I am in the process of changing a code base from cjs
require
to esmimport
and fell in the trap that I thought I could replaceIn the former case,
F
would haveF.Future
etc. but when importing as esm,F
=Future
.The work-around is to use:
It would be nice, if it's was
import F from...
andimport { Future } from ...
. Perhaps this is deliberate but then it should be written in the README ;)I did play around with
index.js
a little to see if I could mimic the behaviour ofindex.cjs
but it quickly got ugly. So I'm all for documenting the difference between the two "import" methods. Basically, add a little bit more to https://github.com/fluture-js/Fluture?tab=readme-ov-file#ecmascript-module.My issue with single name imports, is that I have to do this little ceremony, in order to get Sanctuary to understand the Fluture types, before I can use it anywhere else in my code.
Perhaps there is a better way?
The text was updated successfully, but these errors were encountered: