Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Reorganise `application/common/types/` contents

オープン
#982 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
backend

調査の方向性

Start with the imports and type files named in the review: application/common/types/api/users/ParticipantProfile.ts, participants/participant.ts, participants/invite.ts, and the root survey.ts and invite.ts. Trace their imports and usages, including the four types identified as unused, before deciding which moves belong in this follow-up. Done means shared types are organized at folder level, imports use the folder exports, and the generated spec remains unchanged.

索引モデルが issue の本文から書いたものです。

説明

From @iamtanuj18 's review of #937:

application/commont/types/invite.ts includes this line: import { AlternativeContact, ContactMethod, StateTerritory } from './api/users/ParticipantProfile'

Suggestion: This line reaches into api/users/ParticipantProfile.ts, which holds shared domain types (ContactMethod, StateTerritory, AlternativeContact and so on) rather than one endpoint's request and response. No index.ts exports it, so 16 imports in the backend, both clients and integrations reach into it the same way, and participants/participant.ts and participants/invite.ts (InviteStatus) sit in endpoint folders too. Since you mentioned types/api has no clear pattern, ParticipantProfile.ts and participant.ts could move up to types/, next to survey.ts, and InviteStatus could join the root invite.ts. ParticipantWithProfile (participants/participant.ts:16) could move into getParticipantById.ts, its only user, since it builds on GetParticipantProfileResponse. The moves leave the generated spec unchanged, because TSOA names schemas by type name, not by file.

The wider tidy-up could follow the same idea. ProfilesController and InvitesController get their own folders, each index.ts exports its whole folder (export type for types, plain export for enums and consts), and a no-restricted-imports rule keeps imports at folder level. Four types are never used and could go at the same time: RevokeInviteRequest, GetSurveyVersionByIdResponse, GetUserSurveyStepRequest and GetUserSurveyStepsRequest. All of this could be a follow-up issue if this PR is big enough already.

主要言語
TypeScript
スター
4
フォーク
0
平均マージ
14時間 50分
マージ済み PR(30日)
5

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Garvan-Data-Science-Platform/ctrl のほかの issue

Garvan-Data-Science-Platform/ctrl の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。