@@ -11,6 +11,7 @@ import formatNumber from './formatter';
1111
1212/* eslint class-methods-use-this: 0 */
1313/* eslint-disable no-unused-vars */
14+ /* eslint-disable no-dupe-keys */
1415
1516const X = 0 ;
1617const Y = 1 ;
@@ -56,6 +57,7 @@ class APoint {
5657 /**
5758 * @param {number | (Alg) } x
5859 * @param {number } [y]
60+ * @hidden
5961 */
6062 constructor ( x , y ) {
6163 if ( typeof x === 'function' ) {
@@ -147,14 +149,14 @@ class APoint {
147149 /**
148150 * @param {(point: APointType) => number } alg
149151 * @returns {this }
150- * @throws NotImplementedError
152+ * @throws NotImplementedError ⚠
151153 */
152154 calc ( alg ) {
153155 throw new Error ( 'calc() not implemented' ) ;
154156 }
155157
156158 /**
157- * @throws NotImplementedError
159+ * @throws NotImplementedError ⚠
158160 * @returns {APoint }
159161 */
160162 clone ( ) {
@@ -272,8 +274,14 @@ cachedGetter(APoint, 'lengthSq');
272274/**
273275 * Point
274276 *
277+ * **constructor**
278+ * ___
275279 * new Point(x: *number*, y: *number*): [[Point]]
276280 *
281+ *
282+ *
283+ * **constructor**
284+ * ___
277285 * new Point(alg: (*function*(): *number*)): [[Point]]
278286 *
279287 */
@@ -329,6 +337,8 @@ export class Point extends APoint {
329337/**
330338 * IPoint
331339 *
340+ * **constructors**
341+ * ___
332342 * new IPoint(x: *number*, y: *number*): [[IPoint]]
333343 *
334344 * new IPoint(alg: (*function*(): *number*)): [[IPoint]]
@@ -346,6 +356,7 @@ export class IPoint extends APoint {
346356/**
347357 * @param {Alg } alg
348358 * @return {PointType | IPointType }
359+ * @hidden
349360 */
350361export function calc ( alg ) {
351362 return operatorCalc ( alg ) ;
@@ -354,29 +365,52 @@ export function calc(alg) {
354365const pointFactory = cachedFactory ( Point ) ;
355366
356367/**
357- * *function* point(x: *number*, y: *number*): [[Point]] & *number*
358- *
359- * *function* point(alg: (*function*(): *number*)): [[Point]] & *number*
360- *
361368 * @typedef {(alg: Alg) => PointType } PointAlg
362369 * @typedef {(x: number , y: number) => PointType } PointCon
363- * @typedef {PointAlg & PointCon }
370+ * @typedef {PointAlg & PointCon } point
371+ * @type {point }
372+ * @hidden
364373 */
365- export const point = function point ( x , y ) {
374+ export function point ( x , y ) {
366375 return pointFactory ( x , y ) ;
367- } ;
376+ }
368377
369378const ipointFactory = cachedFactory ( IPoint ) ;
370379
371380/**
372- * *function* ipoint(x: *number*, y: *number*): [[IPoint]] & *number*
373- *
374- * *function* ipoint(alg: (*function*(): *number*)): [[IPoint]] & *number*
375- *
376381 * @typedef {(alg: Alg) => IPointType } IPointAlg
377382 * @typedef {(x: number , y: number) => IPointType } IPointCon
378383 * @typedef {IPointAlg & IPointCon }
379- */
380- export const ipoint = function ipoint ( x , y ) {
384+ * @hidden
385+ */
386+ export function ipoint ( x , y ) {
381387 return ipointFactory ( x , y ) ;
388+ }
389+
390+ export const Export = {
391+ /**
392+ * @param {Alg } alg
393+ * @return {PointType | IPointType }
394+ */
395+ calc : alg => operatorCalc ( alg ) ,
396+
397+ /**
398+ * @type {PointAlg }
399+ */
400+ point : alg => pointFactory ( alg ) ,
401+
402+ /**
403+ * @type {PointCon }
404+ */
405+ point : ( x , y ) => pointFactory ( x , y ) ,
406+
407+ /**
408+ * @type {IPointAlg }
409+ */
410+ ipoint : alg => ipointFactory ( alg ) ,
411+
412+ /**
413+ * @type {IPointCon }
414+ */
415+ ipoint : ( x , y ) => ipointFactory ( x , y )
382416} ;
0 commit comments