New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeScript: TypeError: default is not a constructor errors #72
Comments
This happened to me after updating |
Ok, hm. This was found using TypeScript 5.2.2 and running a unit test using Trying to remove import Fraction from 'fraction.js';
const result: string = new Fraction('1.23').simplify(0.1).toFraction(true);
console.log(result); Output:
(as expected) That seems like it could rule out |
Ah, blast. That output was produced using |
Ok, yep: import Fraction from 'fraction.js';
const result: string = Fraction('1.23').simplify(0.1).toFraction(true);
console.log(result);
I'll try reducing the TypeScript version next, following up on @frostburn's comment. |
No luck as far back as TypeScript v4.3.5 here - the minimal snippet (without any of the In the previous comment I'd omitted the
I'm being a bit spammy here, so I'll pause for a while. |
I'm encountering the same issue with jest, no matter which version of In my tsconfig, I've specified:
|
This is an error I encounter on v4.3.5 but not in v4.3.3 and earlier.
The TypeScript code I'm using is fairly similar to the
README
example.The error output when this test runs is:
The contents of my local
tsconfig.json
file are:{"include": ["src/**/*.ts"]}
The text was updated successfully, but these errors were encountered: