Please publish RC with shape generator
sesm opened this issue · comments
There are 2 issues with not publishing shape generator as RC:
- Documentation website says
Try it! Open the developer console to take the API for a test run.
At the same, shape generator is present in documentation, but library version in console doesn't support it, so attempt to do something likegen({a: '1'})
results inUncaught TypeError: gen is not a function
. - There is no easy way to use
master
version, becausedist
folder is not saved in Github.
A workaround to use master
version now is to fork the repo, build, commit dist
folder and then put Github url into package.json. This doesn't look easy at all.
Not sure of the etiquette of this, but thought I would leave a comment here to try to help other people like myself.
It should be possible to generate shapes in most cases, per the docs:
Whenever a non-ValueGenerator is provided to a function which expects a ValueGenerator, it is converted to a ValueGenerator with
gen()
.
I mention this in case, like me, you came across this issue while searching for info on the error: TypeError: gen is not a function
you receive when you call gen
in jasmine-check. This issue does not mean that it is impossible to generate shapes, so go ahead and just create an object without using gen() explicitly.
However, it does mean that it is impossible to do what you want in certain circumstances:
That makes calling this function optional for most cases, unless trying to be explicit or when using TypeScript or Flow.
So I'm not trying to minimize the issue, only commenting to save people in my situation some time in future.