Use "import type" consistently in our TS code.

Review Request #13713 — Created April 8, 2024 and submitted — Latest diff uploaded

Information

Review Board
release-7.x

Reviewers

The ability to import something solely for its type information is a new
feature in TypeScript, and makes things easier for the compiler later.
This change updates all our existing code to use it where appropriate,
and makes things consistent so we always use import { type ... }
instead of sometimes having import type { ... }.

This also groups all the type imports before all the regular imports
within each import block.

Ran js-tests.

Diff Revision 2 (Latest)

orig
1
2

Commits

First Last Summary ID Author
Use "import type" consistently in our TS code.
The ability to import something solely for its type information is a new feature in TypeScript, and makes things easier for the compiler later. This change updates all our existing code to use it where appropriate, and makes things consistent so we always use `import { type ... }` instead of sometimes having `import type { ... }`. This also groups all the `type` imports before all the regular imports within each import block. Testing Done: Ran js-tests.
76e897a98458924a87f4e72230ef708d775266ed David Trowbridge
This diff has been split across 3 pages: 1 2 3 >
reviewboard/static/rb/js/common/actions/models/menuActionModel.ts
reviewboard/static/rb/js/common/actions/views/actionView.ts
reviewboard/static/rb/js/common/actions/views/menuActionView.ts
reviewboard/static/rb/js/common/models/pageModel.ts
reviewboard/static/rb/js/common/models/userSessionModel.ts
reviewboard/static/rb/js/common/resources/collections/resourceCollection.ts
reviewboard/static/rb/js/common/resources/models/baseCommentModel.ts
reviewboard/static/rb/js/common/resources/models/baseResourceModel.ts
reviewboard/static/rb/js/common/resources/models/draftResourceChildModelMixin.ts
reviewboard/static/rb/js/common/resources/models/draftReviewModel.ts
reviewboard/static/rb/js/common/resources/models/fileAttachmentModel.ts
reviewboard/static/rb/js/common/resources/models/reviewModel.ts
reviewboard/static/rb/js/common/resources/models/reviewReplyModel.ts
reviewboard/static/rb/js/common/resources/models/reviewRequestModel.ts
reviewboard/static/rb/js/common/views/pageView.ts
reviewboard/static/rb/js/reviewRequestPage/views/reviewReplyDraftBannerView.ts
reviewboard/static/rb/js/reviews/collections/diffReviewableCollection.ts
reviewboard/static/rb/js/reviews/models/abstractCommentBlockModel.ts
reviewboard/static/rb/js/reviews/models/abstractReviewableModel.ts
reviewboard/static/rb/js/reviews/models/commentEditorModel.ts
This diff has been split across 3 pages: 1 2 3 >
Loading...