fix: Separate typed instance for each PocomathInstance #15
@ -33,7 +33,14 @@ export default class PocomathInstance {
|
|||||||
* by the signature and returning the value. Otherwise, it should be
|
* by the signature and returning the value. Otherwise, it should be
|
||||||
* a function taking an object with the dependency lists as keys and the
|
* a function taking an object with the dependency lists as keys and the
|
||||||
* requested functions as values, to a function taking the arguments
|
* 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) {
|
install(ops) {
|
||||||
for (const key in ops) this._installOp(key, ops[key])
|
for (const key in ops) this._installOp(key, ops[key])
|
||||||
|
Loading…
Reference in New Issue
Block a user