Open kirevdokimov opened 1 year ago
Temporary solution is to import default and cast to an unknown
import generalize from "@jscad/modeling/src/operations/modifiers/generalize"
...
const generalizedpolyh = (generalize as unknown as any)({ triangulate: true }, polyh);
Actually, the solution is fixing the TS definition.
Expected Behavior
A. Named import of "generalize" should be referencing to an existing js counterpart B. Default import from "@jscad/modeling/src/operations/modifiers/generalize" must be typed
Actual Behavior
A. Named import of "generalize" is typed properly, but referencing to nowhere.
B. Default import works perfectly, but not typed therefore marked as an error by tsc
Steps to Reproduce the Problem
A.
1.Create a typescript file
2.Bundle the script.
3.Run it.
B.
generalize({triangulate: true}, cube())