Port BaseResource (and extra data helpers) to spina.

Review Request #13003 — Created May 3, 2023 and submitted

Information

Review Board
release-6.x

Reviewers

This change ports the BaseResource class to spina and TypeScript. Along
with it comes the ExtraData model and ExtraDataMixin.

  • Ran js-tests.
  • Went through and tested various bits of functionality on the site.
Summary ID
Port BaseResource (and extra data helpers) to spina.
This change ports the `BaseResource` class to spina and TypeScript. Along with it comes the `ExtraData` model and `ExtraDataMixin`. Testing Done: - Ran js-tests. - Went through and tested various bits of functionality on the site.
65dd33ca309bb545121bdb593c6a87dbb58fa3c7
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 …

chipx86chipx86

Should probably be unknown.

chipx86chipx86

Here, too.

chipx86chipx86

Probably should use unknown, unless there are problems. Same below.

chipx86chipx86

This feels strangely wrapped. Can we pull this out into a variable and then check that result?

chipx86chipx86

We can document options as being SaveWithFilesOptions and remove the Option Args now. Same with others.

chipx86chipx86

Same comment as on another change: If we have unit tests include things relatively, we can more easily test without …

chipx86chipx86
chipx86
  1. Very nice! Glad we're getting this in.

  2. Show all issues

    Probably should be unknown instead of any. (any is a last-resort with no type checking, but unknown has some basic type checking).

  3. Show all issues

    Should probably be unknown.

  4. Show all issues

    Here, too.

  5. Show all issues

    Probably should use unknown, unless there are problems.

    Same below.

  6. Show all issues

    This feels strangely wrapped. Can we pull this out into a variable and then check that result?

  7. reviewboard/static/rb/js/common/resources/models/baseResource.ts (Diff revision 1)
     
     
     
     
     
     
     
     
    Show all issues

    We can document options as being SaveWithFilesOptions and remove the Option Args now. Same with others.

  8. Show all issues

    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.

  9. 
      
david
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-6.x (d8a2f4c)