Closed
Bug 1999068
Opened 6 months ago
Closed 6 months ago
TS interface for CustomElementConstructor doesn't match HTMLElement
Categories
(Developer Infrastructure :: Lint and Formatting, task)
Developer Infrastructure
Lint and Formatting
Tracking
(firefox147 fixed)
RESOLVED
FIXED
147 Branch
| Tracking | Status | |
|---|---|---|
| firefox147 | --- | fixed |
People
(Reporter: mstriemer, Assigned: mstriemer)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Our generated type definition for CustomElementConstructor doesn't match elements that extend HTMLElement
customElements.define("my-element", class extends HTMLElement {});
// Argument of type 'typeof (Anonymous class)' is not assignable to parameter of type 'CustomElementConstructor'.
// Type 'typeof (Anonymous class)' provides no match for the signature '(): any'. [2345]
Our interface doesn't match TypeScript's generated types (search for interface CustomElementConstructor)
// Our lib.gecko.dom.d.ts
interface CustomElementConstructor {
(): any;
}
// TypeScript dom.generated.d.ts
interface CustomElementConstructor {
new (...params: any[]): HTMLElement;
}
It looks like the TypeScript lib we use to parse webidl files has an override for CustomElementConstructor
| Assignee | ||
Comment 1•6 months ago
|
||
Updated•6 months ago
|
Assignee: nobody → mstriemer
Status: NEW → ASSIGNED
Pushed by mstriemer@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/d2e94fc8ba3c
https://hg.mozilla.org/integration/autoland/rev/9d2fcd32dbe2
Override CustomElementConstructor type definition in lib.gecko.dom.ts r=Standard8
Comment 3•6 months ago
|
||
Backed out for causing mochites failure on browser_HCM_telemetry.js
Backout link: https://hg-edge.mozilla.org/integration/autoland/rev/98a6999ddf335a8e40f72e6d0f421e619629a806
Log link: https://treeherder.mozilla.org/logviewer?job_id=535794608&repo=autoland&task=DDXK8n8tSyyhZ_GQDqYIOA.0&lineNumber=2366
There were also:
failures on browser_defaultbrowser_alwayscheck.js
failures on test_preferencesBindings_setting.html
failures on sanitize/browser_sanitizeDialog_v2.js
failures on test_preferencesBindings_setting.html
failures on test_setting_control.html
Comment 4•6 months ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
status-firefox147:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 147 Branch
Updated•6 months ago
|
Status: RESOLVED → REOPENED
status-firefox147:
fixed → ---
Resolution: FIXED → ---
Target Milestone: 147 Branch → ---
Pushed by mstriemer@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/a89f89c92e57
https://hg.mozilla.org/integration/autoland/rev/752e87c5374e
Override CustomElementConstructor type definition in lib.gecko.dom.ts r=Standard8
Comment 6•6 months ago
|
||
| bugherder | ||
Status: REOPENED → RESOLVED
Closed: 6 months ago → 6 months ago
status-firefox147:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 147 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•