-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
deps(typescript): update to 3.8.3 #10461
Changes from 2 commits
9681400
2cf1540
2c118bd
9e6e3da
edf6f8c
b76acd7
c83c816
4e77bec
ec03206
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,7 +133,7 @@ async function flushAllTimersAndMicrotasks(ms = 1000) { | |
* @property {(...args: RecursivePartial<Parameters<Driver['goOnline']>>) => ReturnType<Driver['goOnline']>} goOnline | ||
*/ | ||
|
||
/** @typedef {Driver & DriverMockMethods} TestDriver */ | ||
/** @typedef {Omit<Driver, keyof DriverMockMethods> & DriverMockMethods} TestDriver */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 nice |
||
|
||
/** @type {TestDriver} */ | ||
let driver; | ||
|
@@ -512,6 +512,7 @@ describe('.gotoURL', () => { | |
} | ||
const replayConnection = new ReplayConnection(); | ||
|
||
// @ts-ignore: Coerce to TestDriver for looser typing in function parameters. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. since this is a real driver, it seems a little weird to cast to a fake driver type :) One option: could ts-ignore an assertion on const loadOptions = {
waitForLoad: true,
/** @type {LH.Gatherer.PassContext} */
// @ts-ignore - we don't need the entire context for the test.
passContext: {
passConfig: {
pauseAfterLoadMs: 0,
networkQuietThresholdMs: 0,
cpuQuietThresholdMs: 0,
},
},
}; (though we should probably eventually have a |
||
const driver = /** @type {TestDriver} */ (new Driver(replayConnection)); | ||
|
||
// Redirect in log will go through | ||
|
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.
we're not dealing with these safely anyways, and unfortunately the templated-class solution doesn't work in tsc because these are static methods, so what do you think of one of
@param {{optimistic: boolean}} extras
here (and in the other lantern metrics) and@ts-ignore
on the two accesses below orextras
exactly as what's used and@ts-ignore
the call togetEstimateFromSimulation
inlantern-metric.js
I think the intent is clearer either way, and it gives a clearer TODO of what needs to be resolved (on our side or the tsc side) to get
extras
properly checked.