Closed Bug 2088821 Opened 27 days ago Closed 6 days ago

Update and extend the docs the TypeScript agent skills point to

Categories

(Developer Infrastructure :: Source Documentation, task)

task

Tracking

(firefox163 fixed)

RESOLVED FIXED
163 Branch
Tracking Status
firefox163 --- fixed

People

(Reporter: dao, Assigned: dao)

References

(Blocks 1 open bug)

Details

Attachments

(7 external files, 1 obsolete file)

Document what someone needs to enable and maintain TypeScript checking for a component, and correct claims that have gone stale:

  • index.md and linters/typescript.md still describe the linter as tier 3; it has run at tier 2 since bug 1975512.
  • Add typescript/enabling.md: setting up a component's tsconfig.json, the types/*.ts declarations convention, landing with an exclude list and shrinking it, and registering the project with the linter.
  • linters/typescript.md: which project checks a given path, and when the linter reports success without checking anything.
  • bestPractices.md and updatingTypes.md: JSDoc that tsc reads differently than it looks, typing custom elements, and regenerating module paths.
  • Add a browser/docs/ page on how the browser window's scripts load, and which kind of module a converted script becomes: a per-window .mjs for a custom element, a .sys.mjs for other code.

The bestPractices.md note advising against declareLazy stays until bug 1992437 moves it to ChromeUtils. The TypeScript rollouts depend on declareLazy, which is what gives a module's lazy imports types, so the skills will ask for it regardless.

The TypeScript agent skills in bug 2088790 will point to these pages.

Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED
Summary: Document enabling TypeScript for a component and correct the in-tree TypeScript docs → Update and extend the docs the TypeScript agent skills point to
Attachment #9674294 - Attachment is obsolete: true

A chrome probe backs the custom element note: a system module class extending its own HTMLElement passes customElements.define but never upgrades, and its constructor throws NS_ERROR_UNEXPECTED, while a class built from the window's HTMLElement or MozXULElement upgrades. The other facts were checked in the source at this commit.

Keywords: leave-open
Attachment #9676238 - Attachment description: Bug 2088821 - Say when the TypeScript linter checks a declaration file under tools/@types. r?Standard8! DONTBUILD → Bug 2088821 - Add a TypeScript project that checks the declaration files under tools/@types, and point the docs at it. r?Standard8! DONTBUILD
Keywords: leave-open
Pushed by dgottwald@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/cfaf6dcd972a https://hg.mozilla.org/integration/autoland/rev/d5b5887c2d9a Add a TypeScript project that checks the declaration files under tools/@types, and point the docs at it. r=Standard8 DONTBUILD
Status: ASSIGNED → RESOLVED
Closed: 6 days ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: