-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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: update to typescript 4.9.4 #14646
Changes from 2 commits
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 |
---|---|---|
|
@@ -120,7 +120,7 @@ const mergeConfigFragment = _mergeConfigFragment; | |
* Merge an array of items by a caller-defined key. `mergeConfigFragment` is used to merge any items | ||
* with a matching key. | ||
* | ||
* @template T | ||
* @template {Record<string, any>} T | ||
* @param {Array<T>|null|undefined} baseArray | ||
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. btw, the mergeConfigFragment has a comment about doing the typing in config.d.ts because jsodc does not support constraints. it does now (hence this change), but I didn't go further than fixing errors that cropped up. |
||
* @param {Array<T>|null|undefined} extensionArray | ||
* @param {(item: T) => string} keyFn | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -239,13 +239,17 @@ export class TopbarFeatures { | |
* print dialog, all `<details>` are collapsed. | ||
*/ | ||
_setUpCollapseDetailsAfterPrinting() { | ||
// We will feature detect w/ onbeforeprint, so gotta suppress typescript's narrowing. | ||
/** @type {Omit<Window & typeof globalThis, 'onbeforeprint'> & {onbeforeprint?: any}} */ | ||
const self2 = self; | ||
connorjclark marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
// FF and IE implement these old events. | ||
if ('onbeforeprint' in self) { | ||
self.addEventListener('afterprint', this.collapseAllDetails); | ||
if ('onbeforeprint' in self2) { | ||
self2.addEventListener('afterprint', this.collapseAllDetails); | ||
} else { | ||
// Note: FF implements both window.onbeforeprint and media listeners. However, | ||
// it doesn't matchMedia doesn't fire when matching 'print'. | ||
self.matchMedia('print').addListener(mql => { | ||
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. narrowing supposedly got better, because |
||
self2.matchMedia('print').addListener(mql => { | ||
if (mql.matches) { | ||
this.expandAllDetails(); | ||
} else { | ||
|
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 be
Record<string, unkown>
?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.
Not without further changes.