fix: Separate typed instance for each PocomathInstance #15

Merged
glen merged 3 commits from no_complex_base into main 2022-07-22 20:49:14 +00:00
Showing only changes of commit 8070754fb9 - Show all commits

View File

@ -33,7 +33,14 @@ export default class PocomathInstance {
* by the signature and returning the value. Otherwise, it should be
* a function taking an object with the dependency lists as keys and the
* requested functions as values, to a function taking the arguments
* specified by the signature and returning the value
* specified by the signature and returning the value.
*
* Note that the "operation" named `Types` is special: it gives
* types that must be installed in the instance. In this case, the keys
* are type names, and the values are objects with a property 'test'
* giving the predicate for the type, and properties for each type that can
* be converted **to** this type, giving the corresponding conversion
* function.
*/
install(ops) {
for (const key in ops) this._installOp(key, ops[key])