Convert RB.ReviewRequest model to TypeScript/spina.

Review Request #13516 — Created Feb. 1, 2024 and submitted

Information

Review Board
master

Reviewers

This change converts the ReviewRequest resource model to TypeScript.
While I was updating this, I also got rid of the deprecated callbacks
style for its async methods.

Ran js-tests.

Summary ID
Convert RB.ReviewRequest model to TypeScript/spina.
This change converts the ReviewRequest resource model to TypeScript. While I was updating this, I also got rid of the deprecated callbacks style for its async methods. Testing Done: Ran js-tests.
c7da1a1c69cc78cd43ef36ebbbcce4d5249994c4
Description From Last Updated

Add "Args" doc section.

maubinmaubin

Surround the states in double backticks.

maubinmaubin

Similar to the comment I posted on /r/13515/, I'm wondering if we gain anything by making these enums instead.

maubinmaubin

Need to update the docs since we changed the argument name from type to updateType. Should also probably add a …

maubinmaubin

Missing return type.

maubinmaubin
maubin
  1. 
      
  2. reviewboard/static/rb/js/common/resources/models/baseResourceModel.ts (Diff revision 1)
     
     
     
     
     
     
     
     
     
    Show all issues

    Add "Args" doc section.

  3. Show all issues

    Surround the states in double backticks.

  4. Show all issues

    Similar to the comment I posted on /r/13515/, I'm wondering if we gain anything by making these enums instead.

    1. Would be nice but I don't think it's worth breaking compat for that.

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

    Need to update the docs since we changed the argument name from type to updateType. Should also probably add a Version Changed.

    1. Given that JS only really has positional arguments, there's no change from the consumer's perspective.

  6. Show all issues

    Missing return type.

  7. 
      
david
maubin
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed