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
core(script-treemap-data): default config #12494
core(script-treemap-data): default config #12494
Changes from 5 commits
31826f2
d402ec2
a9cf94b
1ff51f2
d0a81d8
6eb2428
f2b2b5f
98b5294
bb2926f
23ac94b
158a220
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.
good call, and this check means the
LH.Audit.Details.TreemapData
cast above can be dropped tooThere 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.
That caused some weird error... Can you try it and see?
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.
ah, perfect, because finally I can see it :)
Looks like this was from my idea in #12483 (comment)
In theory
LH.RawIcu<LH.FormattedIcu<Audit.Details>>
should resolve to an identity transformation and leaveAudit.Details
alone. However when I suggested we adddom?: HTMLElement
toLH.Audit.Details.TreemapData
, that ends up unleashing the zalgo and really putting the test toLH.RawIcu<LH.FormattedIcu<>>
actually being an identity transformation...and it breaks. If you add"noErrorTruncation": true
to our tsconfig you end up with a very fun error message. I would post it here under<details>
but it's 1.7MiB long, repeated a second time in the tsc output for good measure.A selection from our
Audit.Details
monstrosity:(in fairness,
RawIcu
/FormattedIcu
were only ever meant to run on JSON-ish data, not anything with methods, among other things :)I think the best solution is just to keep
dom
out of the audit details type (since it can never be in the LHR anyways) and haveTreemapUtil.walk()
returnLH.Treemap.Node & {dom?: HTMLElement}
so that's still typed.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.
wonder why we both had trouble seeing this locally initially... maybe the type calculation was too massive