Skip to content

Tighten type inference and remove v1 escape hatches #717

@yamcodes

Description

@yamcodes

In #704 , we intentionally loosened types to unblock v1:

  • any in:
    • createEnv(def: unknown)
    • coerce(schema: any)
    • plugin calls (options as any)
  • FilterByPrefix bailout to any extends T ? any : …
  • InferType doing a lot of conditional gymnastics

Scope:

  1. Audit any usage added for Standard Schema support
  2. Replace any with constrained generics where feasible
  3. Revisit InferType complexity and collapse cases
  4. Improve plugin typing without deep-instantiation explosions

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorA change to the codebase that's neither a bug fix nor added functionality

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions