-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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 a few Closure and JSDoc issues. #1441
Conversation
@@ -255,6 +255,7 @@ class Driver { | |||
* If our main document URL redirects, we will update options.url accordingly | |||
* As such, options.url will always represent the post-redirected URL. | |||
* options.initialUrl is the pre-redirect URL that things started with | |||
* @param {!string} opts |
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.
!Object
@@ -38,6 +38,8 @@ class Emitter extends EventEmitter { | |||
/** | |||
* Fires off all status updates. Listen with | |||
* `require('lib/log').events.addListener('status', callback)` | |||
* @param {string} title | |||
|
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.
remove extras newline and add args
param
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.
What type is args
? Object
?
@@ -342,7 +342,7 @@ class LighthouseViewerReport { | |||
|
|||
/** | |||
* Downloads a file (blob) using a[download]. | |||
* @param {Blob|File} The file to save. | |||
* @param {string} blob The file to save. |
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.
this should stay Blob|File
Yup, I'll address your comments later.
…On Jan 8, 2017 20:22, "Eric Bidelman" ***@***.***> wrote:
***@***.**** requested changes on this pull request.
------------------------------
In lighthouse-core/gather/driver.js
<#1441 (review)>
:
> @@ -255,6 +255,7 @@ class Driver {
* If our main document URL redirects, we will update options.url accordingly
* As such, options.url will always represent the post-redirected URL.
* options.initialUrl is the pre-redirect URL that things started with
+ * @param {!string} opts
!Object
------------------------------
In lighthouse-core/lib/log.js
<#1441 (review)>
:
> @@ -38,6 +38,8 @@ class Emitter extends EventEmitter {
/**
* Fires off all status updates. Listen with
* `require('lib/log').events.addListener('status', callback)`
+ * @param {string} title
+
remove extras newline and add args param
------------------------------
In lighthouse-viewer/app/src/lighthouse-report-viewer.js
<#1441 (review)>
:
> @@ -342,7 +342,7 @@ class LighthouseViewerReport {
/**
* Downloads a file (blob) using a[download].
- * @param {Blob|File} The file to save.
+ * @param {string} blob The file to save.
this should stay Blob|File
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1441 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAVVteTDEe6zrOu3QScQf53m2KnASuDXks5rQSmCgaJpZM4Ldr-0>
.
|
@@ -38,6 +38,8 @@ class Emitter extends EventEmitter { | |||
/** | |||
* Fires off all status updates. Listen with | |||
* `require('lib/log').events.addListener('status', callback)` | |||
* @param {string} title | |||
* @param {function(...)} args |
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.
From callsite usage, it look like it's an optional arguments
array.
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.
@@ -48,6 +50,7 @@ class Emitter extends EventEmitter { | |||
/** | |||
* Fires off all warnings. Listen with | |||
* `require('lib/log').events.addListener('warning', callback)` | |||
* @param {function(...)} args |
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.
non-optional arguments
array
@@ -121,6 +121,7 @@ document.addEventListener('DOMContentLoaded', _ => { | |||
/** | |||
* Generates a document fragment containing a list of checkboxes and labels | |||
* for the aggregation categories. | |||
* @param {!Object<null>} list |
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.
@brendankenny is Object<null>
a thing? I only found https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler#type-application
@@ -267,6 +268,7 @@ class LighthouseViewerReport { | |||
|
|||
/** | |||
* Enables pasting a JSON report on the page. | |||
* @param {string} e Event name. |
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.
you can remove "Event name". It's just an event and obvious. Remove throughout.
@ebidel: I reverted the changes. I don't think it's worth me spending more time on this especially since closure doesn't run in CI. So feel free to push here for further improvements, or close it, it's your call. I was just trying to solve the easy Closure issues. |
Understood. Appreciate all your help so far. We can update the rest. |
No description provided.