Skip to content

Replace unsafe/legacy types in ui-kit/form-controls autocomplete family #728

Description

@fpigeonjr

Parent

#586

What to build

Replace unsafe/legacy TypeScript types (any, unsafe function types, wrapper-object types) across the autocomplete component family in src/ui-kit/form-controls (~99 ESLint findings), split out of #706 to keep that PR reviewable.

Scope:

  • autocomplete/autocomplete.component.ts (27)
  • autocomplete/autocomplete.service.ts (2)
  • autocomplete/autocomplete.spec.ts (4)
  • autocomplete-multiselect/autocomplete-multiselect.component.ts (23)
  • autocomplete-multiselect/autocomplete-cache.ts (17)
  • sam-sds-autocomplete/autocomplete-search/autocomplete-search.component.ts (8)
  • sam-sds-autocomplete/autocomplete-search/autocomplete-search.component.spec.ts (4)
  • sam-sds-autocomplete/autocomplete-search/autocomplete-seach-test-service.spec.ts (1)
  • sam-sds-autocomplete/autocomplete/autocomplete.component.ts (6)
  • sam-sds-autocomplete/selected-result/selected-result.component.ts (6)
  • sam-sds-autocomplete/selected-result/models/sds-selected-item-model-helper.ts (1)

Inventory the current findings first (npx eslint src/ui-kit/form-controls/autocomplete src/ui-kit/form-controls/autocomplete-multiselect src/ui-kit/form-controls/sam-sds-autocomplete), then replace each any/unsafe-function-type usage with a precise type or a justified, narrowly-scoped alternative, following the same approach used in #702 and #706.

These components share generic result-type/cache/callback plumbing (the multiselect's cache and the SDS autocomplete's search/selected-result pieces depend on the same result-item shapes), so reviewing them together as one cohesive family makes more sense than splitting further.

Acceptance criteria

  • Unsafe-type findings in the autocomplete component family (autocomplete/, autocomplete-multiselect/, sam-sds-autocomplete/) are inventoried before implementation
  • any usages in this family are replaced with precise types or justified, narrowly scoped alternatives
  • Any wrapper-object or unsafe function types in this family are replaced with safe equivalents
  • Public API and consumer-compiled source compatibility are preserved (no breaking signature changes)
  • Relevant component tests and the full test-app suite remain green
  • The root ESLint warning baseline (eslint-baseline.json) is lowered to reflect the resolved findings

Blocked by

None - can start immediately (independent of #706's remaining scope, split for reviewability rather than dependency)

Activity

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

    maintenanceRepo maintenance / toolingtech-debtTechnical debt cleanup work

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions