mljs / regression-simple-linear

Simple Linear Regression
MIT License
28 stars 6 forks source link

fix: update typescript definition #3

Closed maasencioh closed 3 years ago

codecov[bot] commented 3 years ago

Codecov Report

Merging #3 (db84481) into master (924a5a7) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master        #3   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           46        46           
  Branches         6         6           
=========================================
  Hits            46        46           
Impacted Files Coverage Δ
src/index.js 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 924a5a7...db84481. Read the comment docs.

targos commented 3 years ago

what does it fix? the semantics are not the same

maasencioh commented 3 years ago

Is considered an error when importing from another package

Error: node_modules/ml-regression-simple-linear/regression-simple-linear.d.ts(21,3): error TS2666: Exports and export assignments are not permitted in module augmentations.
targos commented 3 years ago

Well, the issue is that somehow TypeScript thinks it's a module augmentation. But it's not! This file is the module definition. I think that the solution might be to move import BaseRegression from 'ml-regression-base'; inside the declaration.