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

First pass ts conversion for lib/mapfiles #4386

Merged
merged 1 commit into from
Dec 6, 2022
Merged

Conversation

jeremy-rifkin
Copy link
Member

No description provided.

endAddress?: string;
segmentLength: number;
unitName?: string | false;
};
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not in love with the types yet, but they work

Copy link
Member Author

Choose a reason for hiding this comment

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

@partouf do these types look ok to you?

segments: Segment[] = [];
isegments: Segment[] = [];
namedAddresses: Segment[] = [];
entryPoint: '' | EntryPoint = '';
Copy link
Member Author

Choose a reason for hiding this comment

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

entryPoint appears unused but I'm trying to keep changes minimal

* @returns {(object | boolean)}
*/
getLineInfoByAddress(segment, address) {
getLineInfoByAddress(segment: string | boolean, address: number) {
for (let idx = 0; idx < this.lineNumbers.length; idx++) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Lots of index-based loops in this code but again trying to keep changes minimal

Copy link
Contributor

Choose a reason for hiding this comment

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

It was written a long time ago in 2017, I just did what I knew would work :D

Copy link
Member Author

Choose a reason for hiding this comment

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

Perfect for 2017! :P

@jeremy-rifkin jeremy-rifkin merged commit 81ed9f2 into main Dec 6, 2022
@jeremy-rifkin jeremy-rifkin deleted the jr/tsify/mapfiles branch December 6, 2022 01:29
@dkm
Copy link
Member

dkm commented Dec 7, 2022

this is live 🚀

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.

None yet

3 participants