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

core(tsc): add type checking to remaining (dbw) gatherers #5005

Merged
merged 3 commits into from
Apr 20, 2018
Merged

Conversation

brendankenny
Copy link
Member

type checking now on for all gatherers*!

* with six of them left as @ts-nocheck

These were a bit more convoluted than some of our more modern gatherers, but hopefully the changes aren't too much to review. No breaking changes; the only test changes needed were two switches from non-underscored properties to underscored ones.

  • two gatherers are left as @ts-nocheck (domstats.js and tags-blocking-first-paint.js) but basic type checking and their artifacts were added.
  • all-event-listeners.js had the most surgery done as it was gathering way way more info than no-mutation-events needs. I cut down the collected info to just what was needed (or should obviously also be included).

* @param {!Object} options
* @return {!Promise<!Array<!Object>>}
* @param {LH.Gatherer.PassContext} passContext
* @return {!Promise<LH.Artifacts['JSLibraries']>}
Copy link
Collaborator

Choose a reason for hiding this comment

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

no !

Copy link
Member Author

Choose a reason for hiding this comment

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

💥

@@ -41,27 +42,34 @@ function installMediaListener() {
}

/* istanbul ignore next */
Copy link
Collaborator

Choose a reason for hiding this comment

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

double check that this works being before the typedef 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

ok, it does work above or below the jsdoc block, but I moved it below just so it doesn't cause any second guessing some day :)

Unfortunately you still can't merge the comment blocks :(

@@ -21,8 +21,7 @@
"lighthouse-core/lib/emulation.js",
"lighthouse-core/gather/computed/metrics/*.js",
"lighthouse-core/gather/connections/**/*.js",
"lighthouse-core/gather/gatherers/*.js",
"lighthouse-core/gather/gatherers/seo/*.js",
"lighthouse-core/gather/gatherers/**/*.js",
Copy link
Collaborator

Choose a reason for hiding this comment

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

🎉

@paulirish paulirish removed their request for review April 20, 2018 21:18
@brendankenny brendankenny merged commit b150d71 into master Apr 20, 2018
@brendankenny brendankenny deleted the tsdbw branch April 20, 2018 21:27
kdzwinel pushed a commit to kdzwinel/lighthouse that referenced this pull request Aug 16, 2018
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.

4 participants