Closed Bug 1982021 Opened 1 year ago Closed 1 year ago

ChromeUtils.importESModule returns any and prevents type usage

Categories

(Developer Infrastructure :: Lint and Formatting, defect)

defect

Tracking

(firefox143 fixed)

RESOLVED FIXED
143 Branch
Tracking Status
firefox143 --- fixed

People

(Reporter: mkennedy, Assigned: standard8)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

The return type of ChromeUtils.importESModule is incorrectly set to any in lib.gecko.dom.d.ts which is preventing us from checking or using the type of a class returned from it or anything that extends it.

For example the EventEmitter type used at the top of toolkit/content/preferencesBindings.js results in any, so type checking of the class is lost throughout the rest of the file. See attachment.

Attachment #9506016 - Attachment description: /home/mark/Downloads/EventEmitter_any_type.png → EventEmitter_any_type.png
Keywords: regression
Regressed by: 1976049
Assignee: nobody → standard8
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 143 Branch

Moving regression to blocks since we really needed this to be updated to support bug 1976049

Blocks: 1976049
Keywords: regression
No longer regressed by: 1976049
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: