Closed cursande closed 1 year ago
Thank you for making a PR. I think that you are looking for BreeOptions
. That is the type used in the constructor. BreeConfigs
is the type of the bree.configs
property after bree is constructed.
Thank you for making a PR. I think that you are looking for
BreeOptions
. That is the type used in the constructor.BreeConfigs
is the type of thebree.configs
property after bree is constructed.
I got these mixed up, should have picked that up earlier. Thanks for the quick response! Will close
Hi 👋 great lib! I've recently started to integrate this into a TS project to manage some file upload scheduling.
One thing I have noticed is when declaring a value as type
BreeConfigs
, the behaviour and documentation do not seem to align with the property definitions. For instance why iserrorHandler
optional while other properties with defaults are not? TheBreeConfigs
interface may not be the ideal place to change this, but looking at past changes it seemed the most sensible.The default values are all declared within
src/index.js
, so by making these mandatory properties ofBreeConfigs
it will be incorrectly reported as a type error when these fields are omitted. Certainly I can ignore it or write workarounds, but without looking into the source code it wasn't clear to me what was or wasn't really optional.Any thoughts? Apologies if I've missed something silly.
Also updates README with absent config vars, I just used the descriptions also from
src/index.js
.Checklist