Skip to content

Replace unsafe/legacy types in ui-kit/layout-deprecated and ui-kit/form-templates #703

Description

@fpigeonjr

Parent

#586

What to build

Replace unsafe and legacy TypeScript types (any, unsafe function types, wrapper-object types) in src/ui-kit/layout-deprecated and src/ui-kit/form-templates. These two directories are combined into a single slice because they are small and independent (~50 ESLint findings total).

Inventory the current findings first (npx eslint src/ui-kit/layout-deprecated src/ui-kit/form-templates), then replace each any/unsafe-function-type usage with a precise type or a justified, narrowly-scoped alternative (e.g. unknown, a small exported interface, or a concrete union), following the same approach used in #702 (utilities/directives/layout/misc slice of the same parent issue).

Key files with findings as of this writing:

  • layout-deprecated: page.component.ts, pages/form-step.component.ts, results.component.ts, plus scattered spec files
  • form-templates: international-phone/sam-telephone/telephone.component.ts, international-phone/sam-extension/extension.component.ts, international-phone/sam-international-prefix/international-prefix.component.ts, name-entry/name-entry.component.ts, phone-entry/phone-entry.component.ts, international-phone/international.component.ts, plus spec files

Acceptance criteria

  • Unsafe-type findings in src/ui-kit/layout-deprecated and src/ui-kit/form-templates are inventoried before implementation
  • any usages in these directories are replaced with precise types or justified, narrowly scoped alternatives
  • Any wrapper-object or unsafe function types in these directories 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

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