Skip to content
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

fix: mark get/set in AbstractMatrix as abstract #155

Merged
merged 1 commit into from
Nov 4, 2022
Merged

Conversation

Dimava
Copy link
Contributor

@Dimava Dimava commented Nov 2, 2022

While I was implementing a BandMatrix for myself I've noticed that editor does not suggest me to implement get/set fields which I knew were abstract.

Here's a fix.

Please check if it breaks any typings by making classes not implementing get/set abstract (those classes should be made abstract then)

@Dimava
Copy link
Contributor Author

Dimava commented Nov 2, 2022

Seems like I've missed the fact that types are provided and not compiled

@codecov
Copy link

codecov bot commented Nov 2, 2022

Codecov Report

Base: 66.67% // Head: 66.67% // No change to project coverage 👍

Coverage data is based on head (536f08d) compared to base (5ec6888).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #155   +/-   ##
=======================================
  Coverage   66.67%   66.67%           
=======================================
  Files          32       32           
  Lines        3232     3232           
  Branches      514      514           
=======================================
  Hits         2155     2155           
  Misses        997      997           
  Partials       80       80           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Comment on lines +971 to +972
set(rowIndex: number, columnIndex: number, value: number): this;
get(rowIndex: number, columnIndex: number): number;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it really necessary to repeat this in every class definition that extends the abstract one?

Copy link
Contributor Author

@Dimava Dimava Nov 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

d.ts generally follows the code itself, and the code does have the seperate get/set definition in every class

This can be bypassed by making an intermendiate not-abstract class, but the definition is better to comply with actual implementation

This reasoning for it would be more understandable if the overloads were somewhat different from each other

@targos targos merged commit d07f5c6 into mljs:main Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants