feat(PocomathInstance): Add subtypesOf and isSubtypeOf methods
Note this involves refeactoring the internal subtype tracker to keep subtypes in a list sorted in topological order.
This commit is contained in:
parent
340dbd436e
commit
dc6921e768
2 changed files with 39 additions and 11 deletions
|
@ -22,6 +22,7 @@ describe('The default full pocomath instance "math"', () => {
|
|||
|
||||
it('can determine the return types of operations', () => {
|
||||
assert.strictEqual(math.returnTypeOf('negate', 'number'), 'number')
|
||||
assert.strictEqual(math.returnTypeOf('negate', 'NumInt'), 'NumInt')
|
||||
})
|
||||
|
||||
it('can subtract numbers', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue