feat(PocomathInstance): Specify return types of all core methods

This commit is contained in:
Glen Whitney 2022-08-24 19:34:33 -04:00
parent 775bb9ddb7
commit 0950d7d585
3 changed files with 44 additions and 32 deletions

View file

@ -34,6 +34,10 @@ describe('The default full pocomath instance "math"', () => {
math.add(3, math.complex(2.5, 1)), math.complex(5.5, 1))
assert.strictEqual(
math.returnTypeOf('add', 'Complex<number>,NumInt'), 'Complex<number>')
assert.strictEqual(
math.returnTypeOf('chain', 'bigint'), 'Chain<bigint>')
assert.strictEqual(
math.returnTypeOf('returnTypeOf', 'string,string'), 'string')
})
it('can subtract numbers', () => {