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

[Bug] The 'href' property is missed for the CellOptions interface. #320

Closed
elaichenkov opened this issue Jan 18, 2023 · 5 comments · Fixed by #321
Closed

[Bug] The 'href' property is missed for the CellOptions interface. #320

elaichenkov opened this issue Jan 18, 2023 · 5 comments · Fixed by #321

Comments

@elaichenkov
Copy link
Contributor

There's an issue with types. Because the 'href' property is missing in the interface.

Reproducible sample:

const table = new Table();
 
table.push([{ content: 'Text Link', href: 'http://example.com' }]);

image

@theoephraim
Copy link

@speedytwenty - I just installed the latest (0.6.3) and somehow it seems this change did not make it into what is published on npm?

You can see it is missing here: https://www.npmjs.com/package/cli-table3/v/0.6.3?activeTab=code

Thanks so much!

@speedytwenty
Copy link
Collaborator

this change did not make it into what is published on npm?

@theoephraim The change occurred after the 0.6.3 release. There has not been a release since.

I'd like to work #295 in with the fix but haven't had time. I'll see about getting a release out with just the fix when time permits. Cheers!

@theoephraim
Copy link

theoephraim commented Mar 22, 2024

Gotcha! No worries and thanks so much for this tool :)

A full migration to typescript source might be worthwhile rather than maintaining the types. I recently undertook one for a very old tool I maintain and it wasn't nearly as bad as I thought it would be. Lots of time saved on dealing with types and subtle bugs discovered... TS tooling is a lot better now than it used to be too.

Cheers :D

@speedytwenty
Copy link
Collaborator

Thanks for the input. PRs are welcome! :)

The "as bad as I think" is that the essence of cli-table3 is on a basis of clunky tests. The current documentation is generated from what seems to have started as a neat idea to have tests double as documentation code samples.

I could be overestimating it myself, but I'd probably seek to refactor the tests and documentation either in the process or before. Before seems to make sense as a matter of maintaining (or maximizing) test integrity.

@speedytwenty
Copy link
Collaborator

This type fix is now available in the 0.6.4 release: https://github.com/cli-table/cli-table3/releases/tag/v0.6.4

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 a pull request may close this issue.

3 participants