Skip to content

types!: migrate static decorators to registration-scoped typing#565

Open
mcollina wants to merge 2 commits intomainfrom
feat/typed-static
Open

types!: migrate static decorators to registration-scoped typing#565
mcollina wants to merge 2 commits intomainfrom
feat/typed-static

Conversation

@mcollina
Copy link
Member

Summary

Migrate @fastify/static typing from global FastifyReply declaration
augmentation to registration-scoped decorator inference.

Changes include:

  • types/index.d.ts now models reply decorators as plugin-applied effects;
  • types/index.test-d.ts rewritten to assert decorator availability only on
    registered instances;
  • README TypeScript notes updated to document the new registration-scoped
    behavior.

Dependency

This PR is part of the declaration-merging removal stack and depends on:

Please review/merge with that core change in mind.

Validation

  • npm run test:typescript
  • npm run lint -- types

Context

Refs fastify/fastify#5061.

@mcollina mcollina added the semver-major Issue or PR that should land as semver major label Mar 15, 2026
@Fdawgs
Copy link
Member

Fdawgs commented Mar 15, 2026

Do the inline type tags also need updating as part of this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-major Issue or PR that should land as semver major

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants