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

Add missing types declaration file #34

Closed
BadrChoubai opened this issue Aug 12, 2020 · 9 comments
Closed

Add missing types declaration file #34

BadrChoubai opened this issue Aug 12, 2020 · 9 comments

Comments

@BadrChoubai
Copy link

I would like to add the missing type declarations file, this will be my first time contributing to open source and would love to have some back and forth on accomplishing this.

@blikblum
Copy link
Owner

Hi, i would be glad if you do.

My initial idea is writing JSDoc annotation and automatically convert to typings, like described at https://codewithhugo.com/jsdoc-typescript-typings-types-d-ts/

@BadrChoubai
Copy link
Author

I was unaware that this tool existed, I could go ahead and work on generating the types file, unless you were holding this off for any specific reason.

@blikblum
Copy link
Owner

Please go ahead. I don't know when i will have time to do it myself

@BadrChoubai
Copy link
Author

Sure thing, I just gave it a small test. It looks like some of the JSdocs are invalid. I'll have to learn more of the codebase before I can fix the errors.

[TSD-JSDoc] browser.js:27:2 Failed to find parent of doclet 'BrowserLocation#getURL' using memberof 'BrowserLocation',
 this is likely due to invalid JSDoc.
[TSD-JSDoc] browser.js:48:2 Failed to find parent of doclet 'BrowserLocation#replaceURL' using memberof 'BrowserLocati
on', this is likely due to invalid JSDoc.
[TSD-JSDoc] browser.js:59:2 Failed to find parent of doclet 'BrowserLocation#onChange' using memberof 'BrowserLocation
', this is likely due to invalid JSDoc.
[TSD-JSDoc] browser.js:67:2 Failed to find parent of doclet 'BrowserLocation#formatURL' using memberof 'BrowserLocatio
n', this is likely due to invalid JSDoc.
[TSD-JSDoc] browser.js:90:2 Failed to find parent of doclet 'BrowserLocation#removeRoot' using memberof 'BrowserLocati
on', this is likely due to invalid JSDoc.
[TSD-JSDoc] browser.js:101:2 Failed to find parent of doclet 'BrowserLocation#destroy' using memberof 'BrowserLocation
', this is likely due to invalid JSDoc.
[TSD-JSDoc] router.js:37:2 Failed to find parent of doclet 'Router#use' using memberof 'Router', this is likely due to
 invalid JSDoc.
[TSD-JSDoc] router.js:50:2 Failed to find parent of doclet 'Router#map' using memberof 'Router', this is likely due to
 invalid JSDoc.
[TSD-JSDoc] router.js:135:2 Failed to find parent of doclet 'Router#listen' using memberof 'Router', this is likely du
e to invalid JSDoc.
[TSD-JSDoc] router.js:161:2 Failed to find parent of doclet 'Router#transitionTo' using memberof 'Router', this is lik
ely due to invalid JSDoc.
[TSD-JSDoc] router.js:178:2 Failed to find parent of doclet 'Router#replaceWith' using memberof 'Router', this is like
ly due to invalid JSDoc.
[TSD-JSDoc] router.js:191:2 Failed to find parent of doclet 'Router#generate' using memberof 'Router', this is likely
due to invalid JSDoc.
[TSD-JSDoc] router.js:215:2 Failed to find parent of doclet 'Router#destroy' using memberof 'Router', this is likely d
ue to invalid JSDoc.
[TSD-JSDoc] router.js:237:2 Failed to find parent of doclet 'Router#isActive' using memberof 'Router', this is likely
due to invalid JSDoc.
[TSD-JSDoc] router.js:253:2 Failed to find parent of doclet 'Router#doTransition' using memberof 'Router', this is lik
ely due to invalid JSDoc.
[TSD-JSDoc] router.js:288:2 Failed to find parent of doclet 'Router#match' using memberof 'Router', this is likely due
 to invalid JSDoc.
[TSD-JSDoc] router.js:385:2 Failed to find parent of doclet 'Router#createLocation' using memberof 'Router', this is l
ikely due to invalid JSDoc.

@blikblum
Copy link
Owner

Seems is needed some comment on top of the class

I added a initial working setup at https://github.com/blikblum/slick-router/tree/add-types . Feel free to use as a basis

@blikblum
Copy link
Owner

BTW: BrowserLocation does not need to be properly typed. Dont bother with it

@blikblum
Copy link
Owner

blikblum commented Sep 5, 2020

Hi, did you started work on this?

I have some spare time and can work on it if you did not start

@BadrChoubai
Copy link
Author

Hi, unfortunately I did not get to it. School started and I had some things to work on personally.

I’m really interested in this project though as it’s a good solution for one of my biggest gripes with wc.

@blikblum
Copy link
Owner

Added typescript support using typescript JSDoc to declaration files feature

Feel free to report any problem

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

No branches or pull requests

2 participants