Closed Bug 1581569 Opened 5 years ago Closed 5 years ago

Experiment adding TypeScript support to the new performance client

Categories

(DevTools :: Performance Tools (Profiler/Timeline), task, P3)

task

Tracking

(firefox71 fixed)

RESOLVED FIXED
Firefox 71
Tracking Status
firefox71 --- fixed

People

(Reporter: gregtatum, Assigned: gregtatum)

Details

Attachments

(3 files, 3 obsolete files)

We have the new infrastructure to run node scripts in CI, with mocha and jest. We could hook up some CI to configure devtools code to run TypeScript checks using JS Docs. This gets us full type checking, with minimal code changes, and no build step.

This patch changes the use of the recording state object with raw strings.
The strings can be type checked, and there is no more benefit to having
it as an Object. The plain strings are easier to type check.

This commit sets up the configuration for TypeScript to work in tree.
It also adds the commands to run everything in our CI. For now this
configuration is limiting everything to the performance-new directory
as much as possible.

Depends on D46040

Everything should be typed in the JS Docs. I added a bunch of TODOs for features
the could be added in the future, but weren't valuable for this initial
prototype. Unfortunately I couldn't get the @types folder working, and had to
co-locate the redux.d.ts next to the vender file. TypeScript was attempting
to parse the file, and was failing.

Depends on D46041

Assignee: nobody → gtatum
Attachment #9098253 - Attachment description: Bug 1581569 - Rename .jsm files to .jsm.js to allow type checking; r?julienw → Bug 1586757 - Rename .jsm files to .jsm.js to allow type checking; r?julienw
Attachment #9098254 - Attachment description: Bug 1581569 - Create a @types directory and change to // @ts-check; r?julienw → Bug 1586757 - Create a @types directory and change to // @ts-check; r?julienw
Attachment #9098255 - Attachment description: Bug 1581569 - Add types to everything but the components; r?julienw → Bug 1586757 - Add types to everything but the components; r?julienw

Comment on attachment 9098253 [details]
Bug 1586757 - Rename .jsm files to .jsm.js to allow type checking; r?julienw

Revision D47911 was moved to bug 1586757. Setting attachment 9098253 [details] to obsolete.

Attachment #9098253 - Attachment is obsolete: true

Comment on attachment 9098254 [details]
Bug 1586757 - Create a @types directory and change to // @ts-check; r?julienw

Revision D47912 was moved to bug 1586757. Setting attachment 9098254 [details] to obsolete.

Attachment #9098254 - Attachment is obsolete: true

Comment on attachment 9098255 [details]
Bug 1586757 - Add types to everything but the components; r?julienw

Revision D47913 was moved to bug 1586757. Setting attachment 9098255 [details] to obsolete.

Attachment #9098255 - Attachment is obsolete: true
Pushed by gtatum@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/907946837998 Replace recording state object with plain strings; r=julienw https://hg.mozilla.org/integration/autoland/rev/2c1c4849c8c9 Configure the performance client to use TypeScript; r=julienw https://hg.mozilla.org/integration/autoland/rev/1dd081553a3a Add type definitions for performance-new client; r=julienw
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: