-
Notifications
You must be signed in to change notification settings - Fork 28
API Fixes, README cleanup, and generated Reference Documentation #121
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
Conversation
…json into torch2424/readme-cleanup
assembly/JSON.ts
Outdated
| const objs: string[] = []; | ||
| for (let i: i32 = 0; i < this.keys.length; i++) { | ||
| objs.push( | ||
| '"' + this.keys[i] + '":' + this._obj.get(this.keys[i]).toString() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have any tests for this? Given the error above in value's toString it seems like since the value isn't cast to the subclass it should fail.
willemneal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks this looks great! My one request is a simple test for toString for each class.
|
@willemneal Made your requested changes! This should now be good to go! 😄 🎉 |
willemneal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! LGTM!
Yo! 👋
So firstly, my apologies for the large PR 🙃
What had happened was, my plan was to just update the README, but, when I tried using the API the way the README laid it out. It didn't work. And what I assumed happened was that the README must have gotten super out of date with the actual implementation, and thus no longer worked. So I ended up just cleaning up the
JSONnamespace. And API. And since the PR was already huge by then, I was like eh, the last thing I wanted to do was add reference docs using Typedoc, so, let's just do it in this PR 🙃Anyways! What this PR does:
.valueOffunction on our JSON types, to get the underlying primitive type.getXfunctions on the JSON.Obj..isXon the parentJSON.Valueclass.And to mak the review a lot easier, I'd highly suggest just ignoring everything in
docs/as that is all generated 😄Let me know what you think! Thanks! cc @willemneal