* Defines a BooleanT type
* adds options to the Type constructor, so far just to allow conversions
from other types
* renames Number type to NumberT
* records the name of types, and puts the name in the string representation
* defines a conversion fron BooleanT to NumberT, specified to be automatic
* stub code for automatic conversions, not yet complete
* BooleanT not yet added to nanomath
Checked that the new facilities do not disrupt the prior behavior on numbers.
We use [mocha](https://mochajs.org/) as the test framework, as it is
the tool used by mathjs and we would like to make tests as similar
as possible. However, to tighten the linkage between source code and
tests, we adopt a somewhat different file organization: unit tests
for a given source file `blah/foo.js` are in `blah/__test__/foo.spec.js`.
To run all unit tests, execute the script `pnpm test`.
Resolves#3.
Reviewed-on: glen/nanomath#5
Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Co-committed-by: Glen Whitney <glen@studioinfinity.org>
Resolves#1.
A hand test showed this code can add two plus two, always a major milestone. So we will skip review on this PR since there is currently no testing framework, and proceed immediately to addressing #3.
Reviewed-on: glen/nanomath#4
Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Co-committed-by: Glen Whitney <glen@studioinfinity.org>