Convert apiUtils to TypeScript.
Review Request #14157 — Created Sept. 11, 2024 and updated
This change converts our API methods to TypeScript. Our apiUtils file
has a few methods, primary among them beingapiCall
. This change adds
typing for everything, and cleans up some old cruft. It does not yet
make any changes to the internals of how API requests work.In order to facilitate using jasmine for unit tests. these methods are
all exported under a new top-level object calledAPI
.
- Ran js-tests.
- Smoke tested the UI and verified that things still worked correctly.
Summary | ID |
---|---|
a657224ac9ce148f81fce048e852172f42ff500f |
Description | From | Last Updated | ||
---|---|---|---|---|
I don't see where we provide compatibility stubs for the old function names in the RB namespace. |
|
|||
call is a reserved function name. We'll need to call this something else. |
|
|||
I think we want to swap these, given alphabetizing of module names (resourceCollection.ts has it that way). |
|
|||
This can be Record<string, unknown> I think. |
|
|||
While we're changing this, we really should use _.template and gain smart text escaping, since we failed at that originally. |
|
|||
Can you swap these? Alphabetical order. |
|
|||
There are no open issues |
- Change Summary:
-
Rename API.call to API.request
- Commits:
-
Summary ID 0419e1712936fa2c135d34dba6d86215ab2e4945 201e9d99dcada845bdde4bc279628f00f18b1eb9 - Diff:
-
Revision 2 (+858 -452)
Checks run (2 succeeded)
- Commits:
-
Summary ID 201e9d99dcada845bdde4bc279628f00f18b1eb9 a657224ac9ce148f81fce048e852172f42ff500f - Diff:
-
Revision 3 (+872 -452)