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

JSDoc errors #99

Closed
leekahung opened this issue Apr 28, 2023 · 3 comments
Closed

JSDoc errors #99

leekahung opened this issue Apr 28, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@leekahung
Copy link
Contributor

Describe the bug
Running npm run docs gives an error for generating certain types, namely userLIstObject.

To Reproduce
Steps to reproduce the behavior:

  1. run npm run docs
  2. error appears on terminal

Expected behavior
JSDoc is generated without errors

@leekahung leekahung added the bug Something isn't working label Apr 28, 2023
@leekahung
Copy link
Contributor Author

Was able to clear one error for session-core by correcting the typing from Array[userListObject] either userListObject[] or Array.

Array feels more intuitive, but userListObject[] appears cleaner. Might use userListObject[] for the fix.

@leekahung
Copy link
Contributor Author

Fixed issue by adding a dedicated types.d.ts file to assist typedefs.js in typing. Namely, I've added a type for useState:

useState = [T, React.Dispatch]

This will take in the state for T and the setState dispatch function for T

@leekahung
Copy link
Contributor Author

Issue resolved as of PR #100. Closing issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant