feat(PocomathInstance): Add bounded template parameters
This feature helps specify the return type of implementations where the return type depends on the exact subtype that the implementation was called with, such as negate.
This commit is contained in:
parent
dc6921e768
commit
f7bb3697ed
4 changed files with 77 additions and 65 deletions
|
@ -27,7 +27,7 @@ describe('The default full pocomath instance "math"', () => {
|
|||
|
||||
it('can subtract numbers', () => {
|
||||
assert.strictEqual(math.subtract(12, 5), 7)
|
||||
//assert.strictEqual(math.subtract(3n, 1.5), 1.5)
|
||||
assert.throws(() => math.subtract(3n, 1.5), 'TypeError')
|
||||
})
|
||||
|
||||
it('can add numbers', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue