Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Allow extensions to opt-in to using the web-vitals attribution build via the
od_use_web_vitals_attribution_build
filter #1759Allow extensions to opt-in to using the web-vitals attribution build via the
od_use_web_vitals_attribution_build
filter #1759Changes from 6 commits
fc95f4a
651577e
ff3f120
9dd8159
12a3494
be0be49
e9bbe99
ac4d153
098191c
9288025
2f507a0
8ead9ae
ad09dea
3e4d648
c8b490b
36430ad
a229ba6
ba48bd9
581ffbc
eabd8c8
ebfea3f
c2d1a9f
6d95ce1
5de84c6
adf3ae5
e7432ed
d552366
2aaad52
39f8336
1d900d2
efc1aa6
b63b9d2
6d848d5
2f162f2
89b718a
d32ffc0
2802b57
5fd6891
8dd8af6
c6f53fa
fd7fa9f
3614c13
3a30027
a75dd53
9600078
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Could this go back to being defined inline? The type is picked up for me in PhpStorm:
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.
But your PhpStorm clearly only sees
LCPMetric
, notLCPMetricWithAttribution
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.
Good point!
What's strange to me is why this typing is even needed.
With 3614c13 I added more typing for the attribution report functions. Then PHPStorm reports that the arg is detected as a
LCPMetricWithAttribution
:But TypeScript is giving a warning about it being implicit
any
:Nevertheless,
onLCP
is defined as being eitherOnLCPFunction
orOnLCPWithAttributionFunction
:So I would have thought that this would be later be reflected in the type of the arg here. But instead it is showing up as
any
, even though the commonReportOpts
arg is carried through: