Modules exclusively imported with importESModule aren't added to gecko module definitions
Categories
(Developer Infrastructure :: Lint and Formatting, defect)
Tracking
(firefox145 fixed)
| Tracking | Status | |
|---|---|---|
| firefox145 | --- | fixed |
People
(Reporter: mstriemer, Assigned: mstriemer)
References
(Blocks 1 open bug)
Details
(Whiteboard: [recomp])
Attachments
(1 file)
In bug 1976049 we're adding types for Settings UI and UI Widgets. The preferencesBindings.js file is a main entrypoint and unfortunately seems like a decent chunk of work due to legacy reasons to convert to a ESM right now.
As a workaround I figured I'd move its parts into their own ESMs and export those onto window (this is the API that is established) using ChromeUtils.importESModule(). The code works as expected, however there is no type information. I realised that adding the file paths to lib.gecko.modules.d.ts fixes the problem.
Upon investigation it appears that modules imported with importESModule are not actually added to the type definitions, even though it looks like it's intended that they are, it's an issue with the regex grouping.
| Assignee | ||
Comment 1•11 months ago
|
||
Updated•11 months ago
|
| Assignee | ||
Updated•11 months ago
|
Updated•11 months ago
|
Comment 3•11 months ago
|
||
| bugherder | ||
Description
•