Skip to content

types!: add createPlugin helper for registration-scoped typing#282

Open
mcollina wants to merge 3 commits intomainfrom
feat/create-plugin
Open

types!: add createPlugin helper for registration-scoped typing#282
mcollina wants to merge 3 commits intomainfrom
feat/create-plugin

Conversation

@mcollina
Copy link
Member

Summary

This PR introduces a typed createPlugin() helper in fastify-plugin to
support the registration-scoped typing flow used by the declaration-merging
removal migration.

It adds:

  • createPlugin() runtime export;
  • TypeScript typings and examples for createPlugin();
  • tests covering runtime dependency metadata handling for createPlugin().

Context / previous attempts

This continues the work discussed in prior attempts around typed plugin effect
transport:

Dependency on Fastify core migration

This PR is part of the migration stack and depends on Fastify core changes in:

Please review/merge in dependency order.

Validation

  • npm run lint
  • npm run test:unit
  • npm run test:typescript

Issue

Closes #247.

@mcollina mcollina added the semver-major Issue or PR that should land as semver major label Mar 15, 2026
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.

1 participant