Mmanishjha-04

fastify/5/decorate-request-to-getter-method

No description available

Legacy
fastify5migration
Public
28 downloads
0 stars
How to Use
Run this codemod on your codebase using one of the following commands

The easiest way to run this codemod without installing anything globally:

Documentation

This codemod transforms fastify.decorateRequest with static objects into the new Fastify v5 pattern using a getter function.

Before

ts

After

ts

This shows the transition from decorating requests with static objects to using a getter method in Fastify v5, which allows for more dynamic and flexible request decorations.

Ready to contribute?

Build your own codemod and share it with the community.