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

Type Definition missing 'version' - error TS2339: Property 'version' does not exist on type 'typeof axe' #2378

Closed
mohanraj-r opened this issue Jul 14, 2020 · 11 comments
Assignees
Labels
fix Bug fixes typescript TypeScript issues
Milestone

Comments

@mohanraj-r
Copy link
Contributor

Expectation: axe.version doesn't result in type error

Actual: Accessing version with axe.version results in error TS2339: Property 'version' does not exist on type 'typeof axe'

Motivation: Type definition should match runtime behavior where axe.version works directly in browser console or in code after suppressing the error


axe-core version: 3.5.5
axe-webdriver, extension or other integration version: NA

Browser and Assistive Technology versions

For Tooling issues:
- Node version: v12.18.2
- Platform:  Mac
@straker
Copy link
Contributor

straker commented Jul 14, 2020

Thanks for letting us know. I'll make sure to address this when i fix #2317

@straker straker added fix Bug fixes typescript TypeScript issues labels Jul 14, 2020
@mohanraj-r
Copy link
Contributor Author

Thanks @straker
Wondering if this is automated or hand-crafted ?
If automated and easy to do - could be something a person like me who isn't extremely familiar with axe internals could help as well.

@WilcoFiers
Copy link
Contributor

@mohanraj-r It's maintained by hand, which is why there's an issue at all. Would you be interested in putting in a PR? The file to change is this one:

https://github.com/dequelabs/axe-core/blob/develop/axe.d.ts

@WilcoFiers WilcoFiers added this to the Axe-core 4.0 milestone Jul 16, 2020
@mohanraj-r
Copy link
Contributor Author

Thanks @WilcoFiers I can take a stab at it.
Are there tests for the type-definitions ?

@straker
Copy link
Contributor

straker commented Jul 22, 2020

@mohanraj-r our tests for the type file are located here https://github.com/dequelabs/axe-core/blob/develop/typings/axe-core/axe-core-tests.ts

@mohanraj-r
Copy link
Contributor Author

Thanks @straker I will take a stab at it soon - btw if we were to hold a axe hackathon in our team as a way of contributing back is there a list of good first issues that we can use ? I noticed there isn't a corresponding github issue label.

@straker
Copy link
Contributor

straker commented Jul 27, 2020

@mohanraj-r I can go find some issues and put the help wanted or hacktoberfest labels on them for you.

Also, we'll need the version fix in by end of day today (5pm MST) as we are putting a code freeze in place for our release next week. If you can't get it in by then I'll fix it so we have it for 4.0.

@straker straker self-assigned this Jul 28, 2020
@straker
Copy link
Contributor

straker commented Jul 28, 2020

version is now part of the types file for 4.0

@straker straker closed this as completed Jul 28, 2020
@mohanraj-r
Copy link
Contributor Author

Thanks @straker
Sorry I wasn't able to get back in time - swamped with some other things right now.
Yes it would be great if you can label some issues to help the hackathon.

@straker
Copy link
Contributor

straker commented Jul 29, 2020

@mohanraj-r no problem. I've gone through and put the help wanted label on a handful of issues. Some of these issues are discussion points (not ready for prs), but most of them are able to receive a pr. Let us know if you have any questions about the issues and we'll be happy to help.

When are you planning the hackathon?

@mohanraj-r
Copy link
Contributor Author

Thanks @straker
We are planning it on Aug 26th - axe is one of the handful of projects that people can choose for the hackathon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fixes typescript TypeScript issues
Projects
None yet
Development

No branches or pull requests

3 participants