-
Notifications
You must be signed in to change notification settings - Fork 54
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
fix: correct interface properties and methods #213
Conversation
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.
LGTM!
pub(crate) fn is_false(b: &bool) -> bool { | ||
!b | ||
} |
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.
Oof 🙈
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.
Is there a better way?
Just trying to strip out "useless" fields from the JSON serialization, as with large doc structures, it becomes a "problem". lib.dom.d.ts
for example is 9.9mb serialized. 😱
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.
I feel like we should use this and stuff like skip_serializing_if = "Option::is_none"
liberally one day.
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.
Is there a better way?
No, I think this is right. Still pretty funny though 😅
@@ -9,6 +9,7 @@ use crate::js_doc::JsDoc; | |||
use crate::node::DeclarationKind; | |||
use crate::params::ts_fn_param_to_param_def; | |||
use crate::swc_util::get_location; | |||
use crate::swc_util::is_false; |
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.
No big deal, but this isn't really related to swc.
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.
There was no other good place to put it and I wasn't going to just create another module for it.
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.
LGTM
A couple of tweaks of the interface properties and methods in the documents to properly represent them.