You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Do PropTypes go when a panel gets typed props? #230
When a panel becomes .tsx with a props type, is its PropTypes block deleted in the same leaf, kept, or removed in a later sweep with the prop-types dependency? Deleting it removes a runtime check, which the map's types-only rule may forbid.
PropTypes go, in the same leaf that gives the panel typed props.
The question's premise was wrong. Deleting a propTypes block removes no runtime check. The installed React is 19.3.1 and its development builds contain no reference to propTypes; React 19 ignores them. The blocks' only remaining effect is that tsc reads them to infer props while the file is JavaScript, which stops at the rename. So deleting one is dead-code removal and sits inside the map's types-only rule.
Decisions
Same leaf. When a panel becomes .tsx, its propTypes block and its prop-types import are deleted in that leaf.
Store-object props (run, alignment, tree, citation, store) are typed by a small module-local interface holding only what that panel reads. No import type of the store class. This is the rule from the Option prototype, and what src/app/components/OptionSelect.tsx already does with OptionSelectOptionLike.
Required and optional carry over exactly.isRequired becomes a required member; every other prop gets ?. A leaf neither loosens nor tightens a panel's contract.
The direct dependency. The prop-types line leaves package.json in whichever leaf deletes the last import. The yarn.lock stanza stays: MUI and react-transition-group still depend on it.
Naming follows the existing .tsx components: export interface <Name>Props.
Extent: 15 propTypes blocks in 12 files, all under src/app: Console, AstralTreeCard, TreeCard, AlignmentCard (3), Raxml, CitationModal, Output, PartitionFileCard, PartitionEditor (2), Model, Input, components/ErrorDialog.
Activity
jtklein-agents commentedon Nov 16, 2026
Resolution
PropTypes go, in the same leaf that gives the panel typed props.
The question's premise was wrong. Deleting a
propTypesblock removes no runtime check. The installed React is 19.3.1 and its development builds contain no reference topropTypes; React 19 ignores them. The blocks' only remaining effect is thattscreads them to infer props while the file is JavaScript, which stops at the rename. So deleting one is dead-code removal and sits inside the map's types-only rule.Decisions
.tsx, itspropTypesblock and itsprop-typesimport are deleted in that leaf.run,alignment,tree,citation,store) are typed by a small module-local interface holding only what that panel reads. Noimport typeof the store class. This is the rule from the Option prototype, and whatsrc/app/components/OptionSelect.tsxalready does withOptionSelectOptionLike.isRequiredbecomes a required member; every other prop gets?. A leaf neither loosens nor tightens a panel's contract.prop-typesline leavespackage.jsonin whichever leaf deletes the last import. Theyarn.lockstanza stays: MUI andreact-transition-groupstill depend on it..tsxcomponents:export interface <Name>Props.Extent: 15
propTypesblocks in 12 files, all undersrc/app:Console,AstralTreeCard,TreeCard,AlignmentCard(3),Raxml,CitationModal,Output,PartitionFileCard,PartitionEditor(2),Model,Input,components/ErrorDialog.