Skip to content

Turn on strictFunctionTypes #407

Done

Description

@jtklein-agents

Parent

Spec: strict TypeScript

What to build

tsconfig.json turns on strictFunctionTypes, and the code it flags is fixed.

Acceptance criteria

  • tsconfig.json sets "strictFunctionTypes": true.
  • OptionSelectOptionLike (src/app/components/OptionSelect.tsx) is generic over Value extends string | number | readonly string[], with value: Value and setValue: ( value: Value ) => void. OptionSelect is a generic observer component.
  • OptionSelect's onChange has exactly one cast, e.target.value as Value, with a one-line comment saying MUI's change event types the value as Value | string.
  • Every prop type that embeds OptionSelectOptionLike (ModelRun, RaxmlRun, the CardAlignment ng* fields, EditorAlignment.partition.partToAdd) names the field's real value type, with no default type argument: numThreads/numRuns <number>, numRepetitions/numRepetitionsNg <number | string>, outGroup <string[]>, the rest <string>.
  • OptionTextField and OptionCheck are unchanged.
  • ipcMain.handle handlers in src/main/api.ts take IpcMainInvokeEvent, not IpcMainEvent.
  • The RunList listener (src/app/store/RunList.ts) has a type that the listener registry accepts, with no cast.
  • No setValue becomes method syntax to silence the check.
  • yarn verify passes.

Activity

  1. added
    ready-for-agent
    on Nov 27, 2026
  2. added a commit that references this issue on Nov 27, 2026
    9030dde
  3. jtklein-agents commented on Nov 27, 2026

    @jtklein-agents
    OwnerAuthor

    Merged into spec/406-strict-typescript in #411.

  4. added a commit that references this issue on Nov 27, 2026
    a146ed1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions