doc: new special key for PocomathInstance.install

This commit is contained in:
Glen Whitney 2022-07-22 13:46:38 -07:00
parent cf8ad1edfc
commit 8070754fb9

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])