As a user I expect to be able to create a new Integer using Class syntax
Expected:
import { Uint8 } from "fixed-sized-numbers-ts";
let one = Uint8(1)
let two = new Uint8(2)
Actual:
import { Uint8 } from "fixed-sized-numbers-ts";
let one = Uint8(1)
let two = new Uint8(2) //ts error Only a void function can be called with the 'new' keyword. [2350]
Note: a constructor can be provided on a function as they are objects in JS, and this way you can get the dual API
For reference of a working example of this look at bignumber.js
(Written by @JonathanLorimer)
As a user I expect to be able to create a new Integer using Class syntax
Expected:
Actual:
For reference of a working example of this look at bignumber.js