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

Fix a few Closure and JSDoc issues. #1441

Merged
merged 1 commit into from
Jan 9, 2017
Merged

Fix a few Closure and JSDoc issues. #1441

merged 1 commit into from
Jan 9, 2017

Conversation

XhmikosR
Copy link
Contributor

@XhmikosR XhmikosR commented Jan 8, 2017

No description provided.

@@ -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
Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor Author

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.
Copy link
Contributor

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

@XhmikosR
Copy link
Contributor Author

XhmikosR commented Jan 8, 2017 via email

@XhmikosR XhmikosR changed the title Fix a few closure warnings. Fix a few Closure and JSDoc issues. Jan 9, 2017
@@ -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
Copy link
Contributor

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.

Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -267,6 +268,7 @@ class LighthouseViewerReport {

/**
* Enables pasting a JSON report on the page.
* @param {string} e Event name.
Copy link
Contributor

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.

@XhmikosR
Copy link
Contributor Author

XhmikosR commented Jan 9, 2017

@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.

@ebidel
Copy link
Contributor

ebidel commented Jan 9, 2017

Understood. Appreciate all your help so far. We can update the rest.

@ebidel ebidel merged commit 45133b1 into GoogleChrome:master Jan 9, 2017
@XhmikosR XhmikosR deleted the closure branch January 10, 2017 06:09
andrewrota pushed a commit to andrewrota/lighthouse that referenced this pull request Jan 13, 2017
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

Successfully merging this pull request may close these issues.

None yet

2 participants