One of the overloads of the segment constructor allegedly is:
(ps?: Point | undefined, pe?: Point | undefined) => Segment
However when omitting the 2nd argument it fails.
Code
import Geom from '@flatten-js/core';
const { point, segment } = Geom;
segment(point(200, 200))
This code compiles correctly in Typescript.
Output
Uncaught ReferenceError: Illegal Parameters
at Function.get ILLEGAL_PARAMETERS [as ILLEGAL_PARAMETERS] (index.js:8730)
at new Segment (index.js:13059)
at segment (index.js:13369)
at Object.3syrK.jquery (index.js:453)
at newRequire (index.js:71)
at index.js:120
at index.js:143
Expectedsegment(point(200, 200))
should run with throwing error and be equivalent to
segment(point(200, 200), point())
One of the overloads of the segment constructor allegedly is:
(ps?: Point | undefined, pe?: Point | undefined) => Segment
However when omitting the 2nd argument it fails.Code
This code compiles correctly in Typescript.
Output
Expected
segment(point(200, 200))
should run with throwing error and be equivalent tosegment(point(200, 200), point())