TS2348

error TS2348: Value of type ‘typeof BaseN’ is not callable. Did you mean to include ‘new’?

Bad Code ❌

1
2
3
import {BaseN} from 'js-combinatorics';

const iterator = BaseN([1, 2, 3], 2);

Fixed Code ✔️

1
2
3
import {BaseN} from 'js-combinatorics';

const iterator = new BaseN([1, 2, 3], 2);