Port BaseResource (and extra data helpers) to spina.
Review Request #13003 — Created May 3, 2023 and submitted
Information | |
---|---|
david | |
Review Board | |
release-6.x | |
Reviewers | |
reviewboard | |
This change ports the
BaseResource
class to spina and TypeScript. Along
with it comes theExtraData
model andExtraDataMixin
.
- Ran js-tests.
- Went through and tested various bits of functionality on the site.
Summary | |
---|---|
Description | From | Last Updated |
---|---|---|
Probably should be unknown instead of any. (any is a last-resort with no type checking, but unknown has some basic … |
|
|
Should probably be unknown. |
|
|
Here, too. |
|
|
Probably should use unknown, unless there are problems. Same below. |
|
|
This feels strangely wrapped. Can we pull this out into a variable and then check that result? |
|
|
We can document options as being SaveWithFilesOptions and remove the Option Args now. Same with others. |
|
|
Same comment as on another change: If we have unit tests include things relatively, we can more easily test without … |
|
-
-
reviewboard/static/rb/js/common/models/extraDataMixin.ts (Diff revision 1) Probably should be
unknown
instead ofany
. (any
is a last-resort with no type checking, butunknown
has some basic type checking). -
reviewboard/static/rb/js/common/models/extraDataMixin.ts (Diff revision 1) Should probably be
unknown
. -
-
reviewboard/static/rb/js/common/resources/models/baseResource.ts (Diff revision 1) Probably should use
unknown
, unless there are problems.Same below.
-
reviewboard/static/rb/js/common/resources/models/baseResource.ts (Diff revision 1) This feels strangely wrapped. Can we pull this out into a variable and then check that result?
-
reviewboard/static/rb/js/common/resources/models/baseResource.ts (Diff revision 1) We can document
options
as beingSaveWithFilesOptions
and remove theOption Args
now. Same with others. -
reviewboard/static/rb/js/reviews/models/tests/commentEditorModelTests.ts (Diff revision 1) Same comment as on another change: If we have unit tests include things relatively, we can more easily test without needing things to live in
RB
(which will happen during compilation), and we can eventually even treeshake the tests.
Commits: |
|
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+988 -512) |